-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slime Boss - Code #2176
Merged
carlosrpg
merged 22 commits into
OpenAngelArena:master
from
TideSofDarK:slime-boss-code
May 12, 2018
Merged
Slime Boss - Code #2176
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
75e7a8a
Initial Slime Code
TideSofDarK 56e8eaa
Fixed lua errors
TideSofDarK 0698fc3
New IDs for jump and shake
TideSofDarK 9f7aeea
Make area indicator a bit more visible
TideSofDarK 54ee6f8
Better aggro/leash
TideSofDarK f5dceee
New shake mechanic
TideSofDarK 5c49d98
Minor lua fix
TideSofDarK 8e64f34
Swiper boss ability effects
Toyoka 166f35d
BossTier workaround
TideSofDarK 3220597
Fixed split
TideSofDarK 4778884
Slime is not invincible anymore
TideSofDarK 6133e49
Swiper ability indicator effects adjustments
Toyoka 932b57d
Split/Shake fix
TideSofDarK 14ab02d
Merge branch 'asset_branch' of https://github.com/Toyoka/oaa into sli…
TideSofDarK e5cabf1
Invul before split
TideSofDarK f90436b
RemoveOnDeath for split modifier
TideSofDarK a9268af
Removed unused particles; removed modifier_generic_particle.ua which …
TideSofDarK 747c598
Slime spawner enitity
TideSofDarK 1f46169
Merge
TideSofDarK a76cbf5
Fixed force kill
TideSofDarK 0fd1829
Tooltips/IDs
TideSofDarK 8b27513
Whitespace fix
TideSofDarK File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Slime spawner enitity
- Loading branch information
commit 747c5980a84adc0c55b441347964acc04343c09e
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
function Spawn( kv ) | ||
if not IsServer() then | ||
return | ||
end | ||
|
||
if thisEntity == nil then | ||
return | ||
end | ||
thisEntity.bForceKill = false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This whitespace in this file is insane, go through and fix up the indentation. Using an editor that supports |
||
|
||
thisEntity:SetContextThink( "SlimeSpawnerThink", SlimeSpawnerThink, 1 ) | ||
end | ||
|
||
function SlimeSpawnerThink() | ||
if not thisEntity.bInitialized then | ||
thisEntity.vInitialSpawnPos = thisEntity:GetOrigin() | ||
thisEntity.bInitialized = true | ||
end | ||
|
||
if thisEntity.bForceKill then | ||
-- Triggers boss reward | ||
local hAttackerHero = EntIndexToHScript( thisEntity.KillValues.entindex_attacker ) | ||
thisEntity:Kill(nil, hAttackerHero) | ||
return -1 | ||
end | ||
|
||
local function SetClones(clone1, clone2) | ||
thisEntity.clone1 = clone1 | ||
thisEntity.clone2 = clone2 | ||
clone1:OnDeath(OnBossKill) | ||
clone2:OnDeath(OnBossKill) | ||
end | ||
|
||
thisEntity.bossHandle1 = CreateUnitByName('npc_dota_boss_slime', thisEntity:GetAbsOrigin(), true, nil, nil, DOTA_TEAM_NEUTRALS) | ||
thisEntity.bossHandle1.BossTier = thisEntity.BossTier | ||
thisEntity.bossHandle1.SetClones = SetClones | ||
|
||
for i = DOTA_ITEM_SLOT_1, DOTA_ITEM_SLOT_6 do | ||
local item = thisEntity:GetItemInSlot(i) | ||
if item ~= nil then | ||
thisEntity.bossHandle1:AddItemByName( item:GetName() ) | ||
end | ||
end | ||
|
||
return -1 | ||
end | ||
|
||
function OnBossKill(kv) | ||
if (not IsValidEntity(thisEntity.clone1) or not thisEntity.clone1:IsAlive()) and | ||
(not IsValidEntity(thisEntity.clone2) or not thisEntity.clone2:IsAlive()) then | ||
-- Calling Kill or ForceKill from this handler does not work | ||
thisEntity.KillValues = kv | ||
thisEntity.bForceKill = true | ||
thisEntity:SetContextThink( "SlimeSpawnerThink", SlimeSpawnerThink, 0.1 ) | ||
end | ||
end |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to copy the items from the parent, so the copies have heart and the core.
also if you are in fact killing/let the original one die you have to create a spawner unit that will die only when all the splits die as well, otherwise it will not reward the core or reward the core on the first phase kill.
take a look at npc_dota_creature_temple_guardian_spawner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed