52 Commits

Author SHA1 Message Date
2af94f26ca real merge 2022-07-23 13:13:52 -04:00
7a3bbc10c8 Merge branch 'english' of ssh://git.orfl.xyz:2222/2huCardTD/2HUCardTDGame into english 2022-07-23 12:27:53 -04:00
e48fdbe323 changed localization identifiers 2022-07-23 12:27:20 -04:00
2e172f2da5 Merge pull request 'english_translation' (#12) from english_translation into english
Reviewed-on: #12
2022-07-23 16:06:02 +00:00
87c222fc2c Typo 2022-07-23 11:03:35 -04:00
2d71e95b7d fix double quote 2021-11-19 22:04:46 -05:00
39f69ceb83 luna star suny combo wasnt in, whoops 2021-11-18 22:22:38 -05:00
4e5e6cfa47 done with all major stuff 2021-11-15 12:31:11 -05:00
fedb39a381 all heroes should be done, just need to do aux and cleanup 2021-11-15 08:41:39 -05:00
0a5aa15f40 up to komachi 2021-11-15 08:14:11 -05:00
ff163b1ca0 up to kokoro had to rewrite her descriptions from scratch cuz the chinese were WRONG 2021-11-14 18:30:52 -05:00
6431b219ed up to shinki dragon 2021-11-14 17:30:44 -05:00
6d2319a41d did auxiliary stuff, going onto junko and hecatia then new stuff 2021-11-14 17:05:15 -05:00
3ee5ce130f did up to yuugi and pet abilities 2021-11-14 16:41:55 -05:00
07a9d06bdf fixed byakuren last ability, started on miko 2021-11-14 13:52:09 -05:00
8c4dca6e50 up to byakuren 2021-11-14 12:59:07 -05:00
e34388cbca up to shizuha 2021-11-14 10:59:37 -05:00
488b78b54b up to kaguya 2021-11-14 08:45:24 -05:00
a07f22ee1f up to mokou 2021-11-13 14:20:36 -05:00
f3107bd17c up to eirin 2021-11-13 14:01:07 -05:00
064cc567cb disabled lower time for multiplayer 2021-11-13 13:36:16 -05:00
08414bdf59 up to chen 2021-11-13 12:56:58 -05:00
1a112cc79e up to yuuka 2021-11-13 12:23:31 -05:00
f8b004aef7 up to meiling 2021-11-12 20:26:44 -05:00
dbdd26c92e Up to koishi 2021-11-12 19:07:58 -05:00
eb41fd61e9 up to flandre 2021-11-12 18:29:42 -05:00
7c723a17bb up to daiyousei 2021-11-12 15:12:29 -05:00
428142d08c up to rin 2021-11-12 14:21:45 -05:00
627e71c34d more corrections 2021-11-12 12:53:22 -05:00
34d7ae2e98 revert chinese changes 2021-11-12 12:40:20 -05:00
313b2c19a5 up to youmu 2021-11-12 12:38:58 -05:00
85e7cde16e up to yuyuko 2021-11-12 11:12:57 -05:00
ec4bacca90 did up to patchy 2021-11-12 08:59:08 -05:00
9157c06f32 fix quote issue 2021-11-11 23:08:11 -05:00
5948f0bab2 up to marisa 2021-11-11 22:56:44 -05:00
d4effdd095 up to merlin 2021-11-11 21:32:09 -05:00
fe1a4bce00 up to kogasa done 2021-11-11 19:44:19 -05:00
66ca96c406 more translations 2021-11-11 12:58:50 -05:00
ade6133d19 some translations 2021-11-11 12:02:31 -05:00
fbdfa5a67f some tutorial translated 2021-11-11 11:07:09 -05:00
a7d3423bfd panorama translation mostly done, the tips section is gonna be a pain in the ass 2021-11-10 22:00:03 -05:00
a768b7a8f8 added some localizations for basic panorama elements 2021-11-10 19:29:20 -05:00
4de1fa5489 updated panorama localization 2021-11-10 17:52:27 -05:00
aaa089715d restructure 2021-11-10 08:48:00 -05:00
d3eac6b70e this should be checked out into content 2021-11-10 01:35:02 -05:00
f2d8b29206 more 2021-11-10 01:04:06 -05:00
9ee7e31bde decompiled panorama scripts, lets try it out 2021-11-10 00:28:27 -05:00
23e8061588 updated electic stick desc and values to match chinese, since going from 5% damage to 6% seemed weird and 5/5 to 10/10 seems more likely 2021-11-09 19:48:57 -05:00
20ed0454cc missed drink 2021-11-09 10:29:31 -05:00
0c68e45fe7 retranslated most items 2021-11-09 10:26:08 -05:00
9f7f8e8e42 nue localization start 2021-11-07 17:06:59 -05:00
bd33425ef1 fix shikieiki 2021-11-07 15:40:26 -05:00
12023 changed files with 12750 additions and 135428 deletions

15
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
}
]
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,53 +0,0 @@
// No spaces in event names, max length 32
// All strings are case sensitive
//
// valid data key types are:
// string : a zero terminated string
// bool : unsigned int, 1 bit
// byte : unsigned int, 8 bit
// short : signed int, 16 bit
// long : signed int, 32 bit
// float : float, 32 bit
// uint64 : unsigned int 64 bit
// local : any data, but not networked to clients
//
// following key names are reserved:
// local : if set to 1, event is not networked to clients
// unreliable : networked, but unreliable
// suppress : never fire this event
// time : firing server time
// eventid : holds the event ID
"CustomEvents"
{
"trigger_start_touch"
{
"trigger_name" "string"
"activator_entindex" "short"
"caller_entindex" "short"
}
"trigger_end_touch"
{
"trigger_name" "string"
"activator_entindex" "short"
"caller_entindex" "short"
}
"aghsfort_ascension_level_selected"
{
"level" "short"
}
"aghsfort_path_selected"
{
"selected_room" "string"
}
"bullet"
{
"player_id" "short"
"text" "string"
"target" "string"
"item" "string"
"item_level" "short"
"ban" "string"
}
}

View File

@@ -1,22 +0,0 @@
<!-- kv3 encoding:text:version{e21c7f3c-8a33-41c5-9977-a76d3a32aa0d} format:generic:version{7412167c-06e9-4698-aff2-e63eb59037e7} -->
{
custom_net_tables =
[
"aghanim_scores",
"game_global",
"special_ability_upgrades",
"respawns_remaining",
"revive_state",
"room_data",
"reward_options",
"reward_choices",
"minor_ability_upgrades",
"boss_net_table",
"currency_rewards",
"encounter_state",
]
}

View File

@@ -1,72 +0,0 @@
//
// <key> <value>
// Hero currently on/off, will be # of instances (-1 = infinite)
//
"CustomHeroList"
{
//--------------- ENABLED -----------------
"npc_dota_hero_disruptor" "1"
"npc_dota_hero_magnataur" "1"
"npc_dota_hero_mars" "1"
"npc_dota_hero_snapfire" "1"
"npc_dota_hero_sniper" "1"
"npc_dota_hero_tusk" "1"
"npc_dota_hero_ursa" "1"
"npc_dota_hero_viper" "1"
"npc_dota_hero_weaver" "1"
"npc_dota_hero_winter_wyvern" "1"
// Next
"npc_dota_hero_omniknight" "1"
"npc_dota_hero_witch_doctor" "1"
"npc_dota_hero_phantom_assassin" "1"
//---------------- DISABLED -----------------
// Top candidates
"npc_dota_hero_axe" "0"
"npc_dota_hero_centaur" "0" // aghs Stampede allows phasing through obstructions
"npc_dota_hero_legion_commander" "0"
"npc_dota_hero_phantom_assassin" "0"
"npc_dota_hero_pangolier" "0"
// Tanky
"npc_dota_hero_bristleback" "0"
"npc_dota_hero_dragon_knight" "0"
"npc_dota_hero_sven" "0"
"npc_dota_hero_tidehunter" "0"
"npc_dota_hero_tiny" "0"
"npc_dota_hero_treant" "0"
// Fighter
"npc_dota_hero_juggernaut" "0"
"npc_dota_hero_kunkka" "0"
"npc_dota_hero_templar_assassin" "0"
"npc_dota_hero_troll_warlord" "0"
// Archer
"npc_dota_hero_clinkz" "0"
"npc_dota_hero_drow_ranger" "0"
"npc_dota_hero_medusa" "0"
// Wizard
"npc_dota_hero_crystal_maiden" "0"
"npc_dota_hero_dazzle" "0"
"npc_dota_hero_invoker" "0"
"npc_dota_hero_jakiro" "0"
"npc_dota_hero_keeper_of_the_light" "0"
"npc_dota_hero_leshrac" "0"
"npc_dota_hero_lina" "0"
"npc_dota_hero_necrolyte" "0"
"npc_dota_hero_shadow_shaman" "0"
"npc_dota_hero_venomancer" "0"
"npc_dota_hero_weaver" "0"
"npc_dota_hero_zuus" "0"
// Rogue
"npc_dota_hero_bounty" "0"
"npc_dota_hero_riki" "0"
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,220 +0,0 @@
// Dota Heroes File
// NOTE: This is not for creating new heroes, this is for taking a currently existing hero as a template and overriding
// the specified key-value combinations. Use override_hero <hero_to_override> for this.
"DOTAHeroes"
{
//=================================================================================================================
// HERO: Luna
//=================================================================================================================
"npc_dota_hero_luna_aghsfort"
{
"override_hero" "npc_dota_hero_luna"
"Ability1" "aghsfort_luna_lucent_beam"
"Ability6" "aghsfort_luna_eclipse"
}
//=================================================================================================================
// HERO: Magnus
//=================================================================================================================
"npc_dota_hero_magnataur_aghsfort"
{
"override_hero" "npc_dota_hero_magnataur"
"Ability1" "aghsfort_magnataur_shockwave"
"Ability2" "aghsfort_magnataur_empower"
"Ability3" "aghsfort_magnataur_skewer"
"Ability5" "aghsfort_special_magnataur_reverse_polarity_polarity"
"Ability6" "aghsfort_magnataur_reverse_polarity"
"Ability11" "special_bonus_mp_200"
"Ability12" "special_bonus_strength_8"
}
//=================================================================================================================
// HERO: Monkey King
//=================================================================================================================
"npc_dota_hero_monkey_king_aghsfort"
{
"override_hero" "npc_dota_hero_monkey_king"
"Ability4" "monkey_king_jingu_mastery_aghsfort"
}
//=================================================================================================================
// HERO: Omniknight
//=================================================================================================================
"npc_dota_hero_omniknight_aghsfort"
{
"override_hero" "npc_dota_hero_omniknight"
"Ability1" "aghsfort_omniknight_purification"
"Ability2" "aghsfort_omniknight_repel"
"Ability3" "aghsfort_omniknight_degen_aura"
"Ability5" "aghsfort_special_omniknight_guardian_angel_single_target"
"Ability6" "aghsfort_omniknight_guardian_angel"
"Ability10" "special_bonus_mp_250"
"Ability12" "special_bonus_armor_6"
"Ability15" "special_bonus_mp_regen_3"
"Ability17" "special_bonus_unique_omniknight_3"
"ArmorPhysical" "4"
}
//=================================================================================================================
// HERO: Winter Wyvern
//=================================================================================================================
"npc_dota_hero_winter_wyvern_aghsfort"
{
"override_hero" "npc_dota_hero_winter_wyvern"
"Ability1" "aghsfort_winter_wyvern_arctic_burn"
"Ability2" "aghsfort_winter_wyvern_splinter_blast"
"Ability3" "aghsfort_winter_wyvern_cold_embrace"
"Ability6" "aghsfort_winter_wyvern_winters_curse"
"Ability13" "special_bonus_attack_speed_30"
}
//=================================================================================================================
// HERO: Phantom Assassin
//=================================================================================================================
"npc_dota_hero_phantom_assassin_aghsfort"
{
"override_hero" "npc_dota_hero_phantom_assassin"
"Ability1" "aghsfort_phantom_assassin_stifling_dagger"
"Ability2" "aghsfort_phantom_assassin_phantom_strike"
"Ability3" "aghsfort_phantom_assassin_blur"
"Ability6" "aghsfort_phantom_assassin_coup_de_grace"
}
//=================================================================================================================
// HERO: Disruptor
//=================================================================================================================
"npc_dota_hero_disruptor_aghsfort"
{
"override_hero" "npc_dota_hero_disruptor"
"Ability1" "aghsfort_disruptor_thunder_strike"
"Ability2" "aghsfort_disruptor_glimpse"
"Ability3" "aghsfort_disruptor_kinetic_field"
"Ability6" "aghsfort_disruptor_static_storm"
"Ability14" "special_bonus_intelligence_20"
"Ability13" "special_bonus_unique_disruptor_2"
"Ability10" "special_bonus_magic_resistance_20"
}
//=================================================================================================================
// HERO: Snapfire
//=================================================================================================================
"npc_dota_hero_snapfire_aghsfort"
{
"override_hero" "npc_dota_hero_snapfire"
"Ability1" "aghsfort_snapfire_scatterblast"
"Ability2" "aghsfort_snapfire_firesnap_cookie"
"Ability3" "aghsfort_snapfire_lil_shredder"
"Ability4" "aghsfort_snapfire_gobble_up"
"Ability5" "aghsfort_snapfire_spit_creep"
"Ability6" "aghsfort_snapfire_mortimer_kisses"
"Ability16" "special_bonus_attack_damage_90"
}
//=================================================================================================================
// HERO: Tusk
//=================================================================================================================
"npc_dota_hero_tusk_aghsfort"
{
"override_hero" "npc_dota_hero_tusk"
"Ability1" "aghsfort_tusk_ice_shards"
"Ability2" "aghsfort_tusk_snowball"
"Ability3" "aghsfort_tusk_tag_team"
"Ability6" "aghsfort_tusk_walrus_punch"
"Ability7" "aghsfort_tusk_launch_snowball"
"Ability14" "special_bonus_movement_speed_30"
"Ability17" "special_bonus_attack_speed_40"
"ArmorPhysical" "4"
"AttackDamageMin" "29"
"AttackDamageMax" "33"
}
//=================================================================================================================
// HERO: Ursa
//=================================================================================================================
"npc_dota_hero_ursa_aghsfort"
{
"override_hero" "npc_dota_hero_ursa"
"Ability1" "aghsfort_ursa_earthshock"
"Ability2" "aghsfort_ursa_overpower"
"Ability3" "aghsfort_ursa_fury_swipes"
"Ability6" "aghsfort_ursa_enrage"
"Ability10" "special_bonus_attack_damage_20"
"Ability14" "special_bonus_unique_ursa_3"
}
//=================================================================================================================
// HERO: Sniper
//=================================================================================================================
"npc_dota_hero_sniper_aghsfort"
{
"override_hero" "npc_dota_hero_sniper"
"Ability1" "aghsfort_sniper_shrapnel"
"Ability2" "aghsfort_sniper_headshot"
"Ability3" "aghsfort_sniper_take_aim"
"Ability6" "aghsfort_sniper_assassinate"
}
//=================================================================================================================
// HERO: Mars
//=================================================================================================================
"npc_dota_hero_mars_aghsfort"
{
"override_hero" "npc_dota_hero_mars"
"Ability1" "aghsfort_mars_spear"
"Ability2" "aghsfort_mars_gods_rebuke"
"Ability3" "aghsfort_mars_bulwark"
"Ability6" "aghsfort_mars_arena_of_blood"
"Ability9" "aghsfort_mars_bulwark_stop"
}
//=================================================================================================================
// HERO: Viper
//=================================================================================================================
"npc_dota_hero_viper_aghsfort"
{
"override_hero" "npc_dota_hero_viper"
"Ability1" "aghsfort_viper_poison_attack"
"Ability2" "aghsfort_viper_nethertoxin"
"Ability3" "aghsfort_viper_corrosive_skin"
"Ability6" "aghsfort_viper_viper_strike"
"Ability16" "special_bonus_hp_400"
"Ability17" "special_bonus_movement_speed_30"
"Ability11" "special_bonus_spell_lifesteal_6"
}
//=================================================================================================================
// HERO: Weaver
//=================================================================================================================
"npc_dota_hero_weaver_aghsfort"
{
"override_hero" "npc_dota_hero_weaver"
"Ability1" "aghsfort_weaver_the_swarm"
"Ability2" "aghsfort_weaver_shukuchi"
"Ability3" "aghsfort_weaver_geminate_attack"
"Ability6" "aghsfort_weaver_time_lapse"
"Ability11" "special_bonus_agility_6"
"Ability12" "special_bonus_corruption_3"
"Ability16" "special_bonus_hp_475"
"MovementSpeed" "300"
"AttributeBaseStrength" "18"
}
//=================================================================================================================
// HERO: Witch Doctor
//=================================================================================================================
"npc_dota_hero_witch_doctor_aghsfort"
{
"override_hero" "npc_dota_hero_witch_doctor"
"Ability1" "aghsfort_witch_doctor_paralyzing_cask"
"Ability2" "aghsfort_witch_doctor_voodoo_restoration"
"Ability3" "aghsfort_witch_doctor_maledict"
"Ability5" "aghsfort_witch_doctor_death_ward_no_channel"
"Ability6" "aghsfort_witch_doctor_death_ward"
"Ability15" "special_bonus_unique_witch_doctor_4"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,97 +0,0 @@
"neutral_items"
{
"1"
{
"items"
{
"item_broom_handle" "1"
"item_keen_optic" "1"
"item_ocean_heart" "1"
"item_oblivions_locket" "1"
"item_precious_egg" "1"
"item_faded_broach" "1"
"item_longclaws_amulet" "1"
"item_bear_cloak" "1"
"item_arcane_ring" "1"
"item_poor_mans_shield" "1"
"item_winter_embrace" "1"
}
}
"2"
{
"items"
{
"item_ogre_seal_totem" "1"
"item_dragon_scale" "1"
"item_essence_ring" "1"
"item_enchanted_quiver" "1"
"item_pupils_gift" "1"
"item_ring_of_aquila" "1"
"item_grove_bow" "1"
"item_bogduggs_baldric" "1"
"item_craggy_coat" "1"
"item_nether_shawl" "1"
"item_imp_claw" "1"
"item_ambient_sorcery" "1"
"item_vambrace" "1"
"item_paw_of_lucius" "1"
"item_pelt_of_the_old_wolf" "1"
}
}
"3"
{
"items"
{
"item_vampire_fangs" "1"
"item_greater_faerie_fire" "1"
"item_quickening_charm" "1"
"item_titan_sliver" "1"
"item_sign_of_the_arachnid" "1"
"item_preserved_skull" "1"
"item_gravel_foot" "1"
"item_orb_of_destruction" "1"
"item_paladin_sword" "1"
"item_havoc_hammer" "1"
"item_witless_shako" "1"
"item_bogduggs_cudgel" "1"
}
}
"4"
{
"items"
{
"item_stony_coat" "1"
"item_panic_button" "1"
"item_bogduggs_lucky_femur" "1"
"item_illusionsts_cape" "1"
"item_minotaur_horn" "1"
"item_phoenix_ash" "1"
"item_stonework_pendant" "1"
"item_spell_prism" "1"
"item_timeless_relic" "1"
"item_watchers_gaze" "1"
"item_guardian_shell" "1"
}
}
"5"
{
"items"
{
"item_ballista" "1"
"item_demonicon" "1"
"item_force_boots" "1"
"item_mirror_shield" "1"
"item_treads_of_ermacor" "1"
"item_wand_of_the_brine" "1"
"item_fallen_sky" "1"
"item_apex" "1"
"item_slippers_of_the_abyss" "1"
"item_desolator_2" "1"
"item_ex_machina" "1"
"item_trident" "1"
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,282 +0,0 @@
"dota_shops"
{
"consumables"
{
"item" "item_tpscroll"
"item" "item_clarity"
"item" "item_greater_clarity"
"item" "item_faerie_fire"
"item" "item_smoke_of_deceit"
"item" "item_ward_observer"
"item" "item_ward_sentry"
"item" "item_enchanted_mango"
"item" "item_flask"
"item" "item_greater_salve"
"item" "item_tango"
"item" "item_tome_of_knowledge"
"item" "item_dust"
"item" "item_bottle"
}
"attributes"
{
"item" "item_branches"
"item" "item_gauntlets"
"item" "item_slippers"
"item" "item_mantle"
"item" "item_circlet"
"item" "item_belt_of_strength"
"item" "item_boots_of_elves"
"item" "item_robe"
"item" "item_crown"
"item" "item_ogre_axe"
"item" "item_blade_of_alacrity"
"item" "item_staff_of_wizardry"
"item" "item_river_painter7"
"item" "item_river_painter6"
"item" "item_river_painter5"
"item" "item_river_painter4"
"item" "item_river_painter3"
"item" "item_river_painter2"
"item" "item_river_painter"
}
"weapons_armor"
{
"item" "item_ring_of_protection"
"item" "item_stout_shield"
"item" "item_quelling_blade"
"item" "item_infused_raindrop"
"item" "item_orb_of_venom"
"item" "item_blight_stone"
"item" "item_blades_of_attack"
"item" "item_chainmail"
"item" "item_quarterstaff"
"item" "item_helm_of_iron_will"
"item" "item_broadsword"
"item" "item_javelin"
"item" "item_claymore"
"item" "item_mithril_hammer"
}
"misc"
{
"item" "item_magic_stick"
"item" "item_wind_lace"
"item" "item_ring_of_regen"
"item" "item_sobi_mask"
"item" "item_boots"
"item" "item_gloves"
"item" "item_cloak"
"item" "item_ring_of_tarrasque"
"item" "item_gem"
"item" "item_lifesteal"
"item" "item_shadow_amulet"
"item" "item_ghost"
"item" "item_blink"
}
// Level 1 - Green Recipes
"basics"
{
"item" "item_magic_wand"
"item" "item_null_talisman"
"item" "item_wraith_band"
"item" "item_bracer"
"item" "item_soul_ring"
"item" "item_power_treads"
"item" "item_phase_boots"
"item" "item_oblivion_staff"
"item" "item_pers"
"item" "item_mask_of_madness"
"item" "item_helm_of_the_dominator"
"item" "item_hand_of_midas"
"item" "item_travel_boots"
"item" "item_moon_shard"
}
// Level 2 - Blue Recipes
"support"
{
"item" "item_ring_of_basilius"
"item" "item_headdress"
"item" "item_buckler"
"item" "item_urn_of_shadows"
"item" "item_tranquil_boots"
"item" "item_medallion_of_courage"
"item" "item_arcane_boots"
"item" "item_ancient_janggo"
"item" "item_vladmir"
"item" "item_mekansm"
"item" "item_holy_locket"
"item" "item_spirit_vessel"
"item" "item_pipe"
"item" "item_guardian_greaves"
}
"magics"
{
"item" "item_glimmer_cape"
"item" "item_veil_of_discord"
"item" "item_force_staff"
"item" "item_aether_lens"
"item" "item_necronomicon"
"item" "item_dagon"
"item" "item_cyclone"
"item" "item_rod_of_atos"
"item" "item_solar_crest"
"item" "item_orchid"
"item" "item_ultimate_scepter"
"item" "item_nullifier"
"item" "item_refresher"
"item" "item_sheepstick"
"item" "item_octarine_core"
}
// Level 3 - Purple Recipes
"defense"
{
"item" "item_hood_of_defiance"
"item" "item_vanguard"
"item" "item_blade_mail"
"item" "item_soul_booster"
"item" "item_aeon_disk"
"item" "item_crimson_guard"
"item" "item_lotus_orb"
"item" "item_black_king_bar"
"item" "item_hurricane_pike"
"item" "item_shivas_guard"
"item" "item_manta"
"item" "item_bloodstone"
"item" "item_sphere"
"item" "item_heart"
"item" "item_assault"
}
"weapons"
{
"item" "item_lesser_crit"
"item" "item_armlet"
"item" "item_meteor_hammer"
"item" "item_invis_sword"
"item" "item_basher"
"item" "item_monkey_king_bar"
"item" "item_bfury"
"item" "item_ethereal_blade"
"item" "item_radiance"
"item" "item_greater_crit"
"item" "item_butterfly"
"item" "item_silver_edge"
"item" "item_rapier"
"item" "item_abyssal_blade"
"item" "item_bloodthorn"
}
// Level 4 - Orange / Orb / Artifacts
"artifacts"
{
"item" "item_dragon_lance"
"item" "item_sange"
"item" "item_yasha"
"item" "item_kaya"
"item" "item_echo_sabre"
"item" "item_maelstrom"
"item" "item_diffusal_blade"
"item" "item_heavens_halberd"
"item" "item_desolator"
"item" "item_kaya_and_sange"
"item" "item_sange_and_yasha"
"item" "item_yasha_and_kaya"
"item" "item_satanic"
"item" "item_skadi"
"item" "item_mjollnir"
}
"sideshop1"
{
"item" "item_tpscroll"
"item" "item_magic_stick"
"item" "item_quelling_blade"
"item" "item_boots"
"item" "item_boots_of_elves"
"item" "item_belt_of_strength"
"item" "item_robe"
"item" "item_crown"
}
"sideshop2"
{
"item" "item_gloves"
"item" "item_chainmail"
"item" "item_cloak"
"item" "item_void_stone"
"item" "item_helm_of_iron_will"
"item" "item_energy_booster"
"item" "item_vitality_booster"
"item" "item_lifesteal"
"item" "item_broadsword"
"item" "item_blink"
}
"secretshop"
{
"item" "item_ring_of_health"
"item" "item_void_stone"
"item" "item_energy_booster"
"item" "item_vitality_booster"
"item" "item_point_booster"
"item" "item_platemail"
"item" "item_talisman_of_evasion"
"item" "item_hyperstone"
"item" "item_ultimate_orb"
"item" "item_demon_edge"
"item" "item_mystic_staff"
"item" "item_reaver"
"item" "item_eagle"
"item" "item_relic"
}
"pregame"
{
"item" "item_clarity"
"item" "item_faerie_fire"
"item" "item_enchanted_mango"
"item" "item_tango"
"item" "item_flask"
"item" "item_smoke_of_deceit"
"item" "item_dust"
"item" "item_courier"
"item" "item_ward_observer"
"item" "item_ward_sentry"
"item" "item_branches"
"item" "item_gauntlets"
"item" "item_slippers"
"item" "item_mantle"
"item" "item_circlet"
"item" "item_recipe_magic_wand"
"item" "item_ring_of_protection"
"item" "item_stout_shield"
"item" "item_quelling_blade"
"item" "item_blight_stone"
"item" "item_orb_of_venom"
"item" "item_wind_lace"
"item" "item_magic_stick"
"item" "item_sobi_mask"
"item" "item_ring_of_regen"
"item" "item_boots"
"item" "item_gloves"
"item" "item_crown"
"item" "item_wraith_band"
"item" "item_null_talisman"
"item" "item_bracer"
"item" "item_blades_of_attack"
"item" "item_ring_of_basilius"
"item" "item_buckler"
"item" "item_headdress"
}
}

View File

@@ -1,289 +0,0 @@
"dota_shops"
{
"custom"
{
"boss_shop"
{
"1"
{
"item" "item_life_rune"
"item" "item_small_scepter_fragment"
"item" "item_book_of_strength"
"item" "item_book_of_agility"
"item" "item_book_of_intelligence"
"item" "item_purification_potion"
"item" "item_ravage_potion"
"item" "item_echo_slam_potion"
"item" "item_arcanist_potion"
"item" "item_dragon_potion"
}
"2"
{
}
}
}
"attributes"
{
"item" "item_branches"
"item" "item_gauntlets"
"item" "item_slippers"
"item" "item_mantle"
"item" "item_circlet"
"item" "item_belt_of_strength"
"item" "item_boots_of_elves"
"item" "item_robe"
"item" "item_crown"
"item" "item_ogre_axe"
"item" "item_blade_of_alacrity"
"item" "item_staff_of_wizardry"
"item" "item_river_painter7"
"item" "item_river_painter6"
"item" "item_river_painter5"
"item" "item_river_painter4"
"item" "item_river_painter3"
"item" "item_river_painter2"
"item" "item_river_painter"
}
"weapons_armor"
{
"item" "item_ring_of_protection"
"item" "item_stout_shield"
"item" "item_quelling_blade"
"item" "item_infused_raindrop"
"item" "item_orb_of_venom"
"item" "item_blight_stone"
"item" "item_blades_of_attack"
"item" "item_chainmail"
"item" "item_quarterstaff"
"item" "item_helm_of_iron_will"
"item" "item_broadsword"
"item" "item_javelin"
"item" "item_claymore"
"item" "item_mithril_hammer"
}
"misc"
{
"item" "item_magic_stick"
"item" "item_wind_lace"
"item" "item_ring_of_regen"
"item" "item_sobi_mask"
"item" "item_boots"
"item" "item_gloves"
"item" "item_cloak"
"item" "item_ring_of_tarrasque"
"item" "item_gem"
"item" "item_lifesteal"
"item" "item_shadow_amulet"
"item" "item_ghost"
"item" "item_blink"
}
// Level 1 - Green Recipes
"basics"
{
"item" "item_magic_wand"
"item" "item_null_talisman"
"item" "item_wraith_band"
"item" "item_bracer"
"item" "item_soul_ring"
"item" "item_power_treads"
"item" "item_phase_boots"
"item" "item_oblivion_staff"
"item" "item_pers"
"item" "item_mask_of_madness"
"item" "item_helm_of_the_dominator"
"item" "item_hand_of_midas"
"item" "item_travel_boots"
"item" "item_moon_shard"
}
// Level 2 - Blue Recipes
"support"
{
"item" "item_ring_of_basilius"
"item" "item_headdress"
"item" "item_buckler"
"item" "item_urn_of_shadows"
"item" "item_tranquil_boots"
"item" "item_medallion_of_courage"
"item" "item_arcane_boots"
"item" "item_ancient_janggo"
"item" "item_vladmir"
"item" "item_mekansm"
"item" "item_holy_locket"
"item" "item_spirit_vessel"
"item" "item_pipe"
"item" "item_guardian_greaves"
}
"magics"
{
"item" "item_glimmer_cape"
"item" "item_veil_of_discord"
"item" "item_force_staff"
"item" "item_aether_lens"
"item" "item_necronomicon"
"item" "item_dagon"
"item" "item_cyclone"
"item" "item_rod_of_atos"
"item" "item_solar_crest"
"item" "item_orchid"
"item" "item_ultimate_scepter"
"item" "item_nullifier"
"item" "item_refresher"
"item" "item_sheepstick"
"item" "item_octarine_core"
}
// Level 3 - Purple Recipes
"defense"
{
"item" "item_hood_of_defiance"
"item" "item_vanguard"
"item" "item_blade_mail"
"item" "item_soul_booster"
"item" "item_aeon_disk"
"item" "item_crimson_guard"
"item" "item_lotus_orb"
"item" "item_black_king_bar"
"item" "item_hurricane_pike"
"item" "item_shivas_guard"
"item" "item_manta"
"item" "item_bloodstone"
"item" "item_sphere"
"item" "item_heart"
"item" "item_assault"
}
"weapons"
{
"item" "item_lesser_crit"
"item" "item_armlet"
"item" "item_meteor_hammer"
"item" "item_invis_sword"
"item" "item_basher"
"item" "item_monkey_king_bar"
"item" "item_bfury"
"item" "item_ethereal_blade"
"item" "item_radiance"
"item" "item_greater_crit"
"item" "item_butterfly"
"item" "item_silver_edge"
"item" "item_rapier"
"item" "item_abyssal_blade"
"item" "item_bloodthorn"
}
// Level 4 - Orange / Orb / Artifacts
"artifacts"
{
"item" "item_dragon_lance"
"item" "item_sange"
"item" "item_yasha"
"item" "item_kaya"
"item" "item_echo_sabre"
"item" "item_maelstrom"
"item" "item_diffusal_blade"
"item" "item_heavens_halberd"
"item" "item_desolator"
"item" "item_kaya_and_sange"
"item" "item_sange_and_yasha"
"item" "item_yasha_and_kaya"
"item" "item_satanic"
"item" "item_skadi"
"item" "item_mjollnir"
}
"sideshop1"
{
"item" "item_tpscroll"
"item" "item_magic_stick"
"item" "item_quelling_blade"
"item" "item_boots"
"item" "item_boots_of_elves"
"item" "item_belt_of_strength"
"item" "item_robe"
"item" "item_crown"
}
"sideshop2"
{
"item" "item_gloves"
"item" "item_chainmail"
"item" "item_cloak"
"item" "item_void_stone"
"item" "item_helm_of_iron_will"
"item" "item_energy_booster"
"item" "item_vitality_booster"
"item" "item_lifesteal"
"item" "item_broadsword"
"item" "item_blink"
}
"secretshop"
{
"item" "item_ring_of_health"
"item" "item_void_stone"
"item" "item_energy_booster"
"item" "item_vitality_booster"
"item" "item_point_booster"
"item" "item_platemail"
"item" "item_talisman_of_evasion"
"item" "item_hyperstone"
"item" "item_ultimate_orb"
"item" "item_demon_edge"
"item" "item_mystic_staff"
"item" "item_reaver"
"item" "item_eagle"
"item" "item_relic"
}
"pregame"
{
"item" "item_clarity"
"item" "item_faerie_fire"
"item" "item_enchanted_mango"
"item" "item_tango"
"item" "item_flask"
"item" "item_smoke_of_deceit"
"item" "item_dust"
"item" "item_courier"
"item" "item_ward_observer"
"item" "item_ward_sentry"
"item" "item_branches"
"item" "item_gauntlets"
"item" "item_slippers"
"item" "item_mantle"
"item" "item_circlet"
"item" "item_recipe_magic_wand"
"item" "item_ring_of_protection"
"item" "item_stout_shield"
"item" "item_quelling_blade"
"item" "item_blight_stone"
"item" "item_orb_of_venom"
"item" "item_wind_lace"
"item" "item_magic_stick"
"item" "item_sobi_mask"
"item" "item_ring_of_regen"
"item" "item_boots"
"item" "item_gloves"
"item" "item_crown"
"item" "item_wraith_band"
"item" "item_null_talisman"
"item" "item_bracer"
"item" "item_blades_of_attack"
"item" "item_ring_of_basilius"
"item" "item_buckler"
"item" "item_headdress"
}
}

View File

@@ -1,27 +0,0 @@
//default
"default_aghanim"
{
"dsp" "0"
"fadetime" "3"
"Soundmixer" "Aghanim_Mix"
"playlooping"
{
"volume" ".4"
"pitch" "100"
"wave" "sounds/ambient/soundscapes/temple_lp.vsnd"
}
"playrandom"
{
"volume" "0.4, 0.6"
"pitch" "95, 105"
"time" "18, 24"
"position" "random"
"rndwave"
{
"wave" "sounds/ambient/soundscapes/temple_drone.vsnd"
"wave" "sounds/ambient/soundscapes/deathmaze_drone.vsnd"
}
}
}

View File

@@ -1,8 +0,0 @@
soundscapes_manifest
{
// List additional soundscape files here
"file" "scripts/soundscapes_aghanim.txt"
"file" "scripts/soundscapes_dota.txt"
}

View File

@@ -1,222 +0,0 @@
criterion "Isaghanim" "classname" "npc_dota_boss_aghanim" weight 5 required
criterion "IsEnemyaghanim" "targetclassname" "npc_dota_boss_aghanim" weight 5 required
criterion "IsAllyaghanim" "nearby_ally" "npc_dota_boss_aghanim" weight 5 required
criterion "IsBossIntro" "announce_event" "boss_intro" weight 5 required
criterion "IsBested" "announce_event" "bested" weight 5 required
criterion "IsLaugh" "announce_event" "laugh" weight 5 required
criterion "IsAbilityUse" "announce_event" "ability_use" weight 5 required
criterion "IsCrystalAttack" "ability_name" "aghanim_crystal_attack" weight 5 required
criterion "IsStaffBeams" "ability_name" "aghanim_staff_beams" weight 5 required
criterion "IsBlink" "ability_name" "aghanim_blink" weight 5 required
criterion "IsSummonPortals" "ability_name" "aghanim_summon_portals" weight 5 required
criterion "IsSpellSwap" "ability_name" "aghanim_spell_swap" weight 5 required
criterion "IsShardAttack" "ability_name" "aghanim_shard_attack" weight 5 required
Response aghanim_CustomIsBossIntro
{
scene "scenes/aghanim/aghanim_aghs_battle_intro_01.vcd" nodelay noscene
scene "scenes/aghanim/aghanim_aghs_battle_intro_03.vcd" nodelay noscene
scene "scenes/aghanim/aghanim_aghs_battle_intro_04.vcd" nodelay noscene
scene "scenes/aghanim/aghanim_aghs_battle_intro_05.vcd" nodelay noscene
}
Rule aghanim_CustomIsBossIntro_Rule
{
criteria Custom Isaghanim IsBossIntro
response aghanim_CustomIsBossIntro
}
Response aghanim_CustomIsBossIntroChance_10%
{
scene "scenes/aghanim/aghanim_aghs_battle_intro_02.vcd" nodelay noscene
}
Rule aghanim_CustomIsBossIntroChance_10%_Rule
{
criteria Custom Isaghanim IsBossIntro Chance_10%
response aghanim_CustomIsBossIntroChance_10%
}
Response aghanim_CustomIsAbilityUseIsCrystalAttack
{
scene "scenes/aghanim/aghanim_aghs_battle_bark_01.vcd" nodelay noscene defaultdelay respeakdelay 60
scene "scenes/aghanim/aghanim_aghs_conjures_magic_01.vcd" nodelay noscene defaultdelay respeakdelay 60
}
Rule aghanim_CustomIsAbilityUseIsCrystalAttack_Rule
{
criteria Custom Isaghanim IsAbilityUse IsCrystalAttack
response aghanim_CustomIsAbilityUseIsCrystalAttack
}
Response aghanim_CustomIsAbilityUse
{
scene "scenes/aghanim/aghanim_aghs_battle_bark_02.vcd" nodelay noscene defaultdelay respeakdelay 20
scene "scenes/aghanim/aghanim_aghs_battle_bark_06.vcd" nodelay noscene defaultdelay respeakdelay 20
scene "scenes/aghanim/aghanim_aghs_battle_bark_07.vcd" nodelay noscene defaultdelay respeakdelay 20
}
Rule aghanim_CustomIsAbilityUse_Rule
{
criteria Custom Isaghanim IsAbilityUse
response aghanim_CustomIsAbilityUse
}
Response aghanim_CustomIsAbilityUseIsSpellSwap
{
scene "scenes/aghanim/aghanim_aghs_battle_bark_03.vcd" nodelay noscene defaultdelay respeakdelay 20
scene "scenes/aghanim/aghanim_aghs_teleportation_03.vcd" nodelay noscene defaultdelay respeakdelay 20
}
Rule aghanim_CustomIsAbilityUseIsSpellSwap_Rule
{
criteria Custom Isaghanim IsAbilityUse IsSpellSwap
response aghanim_CustomIsAbilityUseIsSpellSwap
}
Response aghanim_CustomIsAbilityUseIsShardAttack
{
scene "scenes/aghanim/aghanim_aghs_battle_bark_04.vcd" nodelay noscene defaultdelay respeakdelay 20
scene "scenes/aghanim/aghanim_aghs_teleportation_02.vcd" nodelay noscene defaultdelay respeakdelay 20
}
Rule aghanim_CustomIsAbilityUseIsShardAttack_Rule
{
criteria Custom Isaghanim IsAbilityUse IsShardAttack
response aghanim_CustomIsAbilityUseIsShardAttack
}
Response aghanim_CustomIsAbilityUseIsBlink
{
scene "scenes/aghanim/aghanim_aghs_battle_bark_05.vcd" nodelay noscene defaultdelay respeakdelay 60
scene "scenes/aghanim/aghanim_aghs_teleportation_01.vcd" nodelay noscene defaultdelay respeakdelay 20
}
Rule aghanim_CustomIsAbilityUseIsBlink_Rule
{
criteria Custom Isaghanim IsAbilityUse IsBlink
response aghanim_CustomIsAbilityUseIsBlink
}
Response aghanim_CustomIsAbilityUseIsStaffBeams
{
scene "scenes/aghanim/aghanim_aghs_battle_bark_08.vcd" nodelay noscene defaultdelay respeakdelay 20
scene "scenes/aghanim/aghanim_aghs_conjures_magic_02.vcd" nodelay noscene defaultdelay respeakdelay 20
}
Rule aghanim_CustomIsAbilityUseIsStaffBeams_Rule
{
criteria Custom Isaghanim IsAbilityUse IsStaffBeams
response aghanim_CustomIsAbilityUseIsStaffBeams
}
Response aghanim_CustomIsAbilityUseIsSummonPortals
{
scene "scenes/aghanim/aghanim_aghs_battle_bark_09.vcd" nodelay noscene defaultdelay respeakdelay 20
scene "scenes/aghanim/aghanim_aghs_conjures_magic_03.vcd" nodelay noscene defaultdelay respeakdelay 20
}
Rule aghanim_CustomIsAbilityUseIsSummonPortals_Rule
{
criteria Custom Isaghanim IsAbilityUse IsSummonPortals
response aghanim_CustomIsAbilityUseIsSummonPortals
}
Response aghanim_CustomIsLaugh
{
scene "scenes/aghanim/aghanim_aghs_battle_bark_laugh_01.vcd" nodelay noscene defaultdelay respeakdelay 20
scene "scenes/aghanim/aghanim_aghs_battle_bark_laugh_02.vcd" nodelay noscene defaultdelay respeakdelay 20
scene "scenes/aghanim/aghanim_aghs_battle_bark_laugh_03.vcd" nodelay noscene defaultdelay respeakdelay 20
}
Rule aghanim_CustomIsLaugh_Rule
{
criteria Custom Isaghanim IsLaugh
response aghanim_CustomIsLaugh
}
Response aghanim_CustomIsHeroKilled
{
scene "scenes/aghanim/aghanim_aghs_kills_hero_final_battle_01.vcd" nodelay noscene speakonce
scene "scenes/aghanim/aghanim_aghs_kills_hero_final_battle_02.vcd" nodelay noscene speakonce
scene "scenes/aghanim/aghanim_aghs_kills_hero_final_battle_03.vcd" nodelay noscene speakonce
scene "scenes/aghanim/aghanim_aghs_kills_hero_final_battle_04.vcd" nodelay noscene speakonce
}
Rule aghanim_CustomIsHeroKilled_Rule
{
criteria Custom Isaghanim IsHeroKilled
response aghanim_CustomIsHeroKilled
}
Response aghanim_CustomIsBested
{
scene "scenes/aghanim/aghanim_aghs_bested_noise_01.vcd" nodelay noscene
scene "scenes/aghanim/aghanim_aghs_bested_noise_02.vcd" nodelay noscene
scene "scenes/aghanim/aghanim_aghs_bested_noise_final_01.vcd" nodelay noscene
}
Rule aghanim_CustomIsBested_Rule
{
criteria Custom Isaghanim IsBested
response aghanim_CustomIsBested
}
Response aghanim_CustomIsTeamWipe
{
scene "scenes/aghanim/aghanim_aghs_beats_player_01.vcd" nodelay noscene
scene "scenes/aghanim/aghanim_aghs_beats_player_02.vcd" nodelay noscene
scene "scenes/aghanim/aghanim_aghs_beats_player_03.vcd" nodelay noscene
}
Rule aghanim_CustomIsTeamWipe_Rule
{
criteria Custom Isaghanim IsTeamWipe
response aghanim_CustomIsTeamWipe
}
Response aghanim_CustomIsAghanimLosesIsAscension0
{
scene "scenes/aghanim/aghanim_aghs_player_beats_aghs_lvl_1_01.vcd" nodelay noscene
}
Rule aghanim_CustomIsAghanimLosesIsAscension0_Rule
{
criteria Custom Isaghanim IsAghanimLoses IsAscension0
response aghanim_CustomIsAghanimLosesIsAscension0
}
Response aghanim_CustomIsAghanimLosesIsAscension1
{
scene "scenes/aghanim/aghanim_aghs_player_beats_aghs_lvl_2_01.vcd" nodelay noscene
}
Rule aghanim_CustomIsAghanimLosesIsAscension1_Rule
{
criteria Custom Isaghanim IsAghanimLoses IsAscension1
response aghanim_CustomIsAghanimLosesIsAscension1
}
Response aghanim_CustomIsAghanimLosesIsAscension2
{
scene "scenes/aghanim/aghanim_aghs_player_beats_aghs_lvl_3_01.vcd" nodelay noscene
scene "scenes/aghanim/aghanim_aghs_player_beats_aghs_lvl_4_01.vcd" nodelay noscene
}
Rule aghanim_CustomIsAghanimLosesIsAscension2_Rule
{
criteria Custom Isaghanim IsAghanimLoses IsAscension2
response aghanim_CustomIsAghanimLosesIsAscension2
}
Response aghanim_CustomIsAghanimLosesIsAscension3
{
scene "scenes/aghanim/aghanim_aghs_player_beats_aghs_lvl_5_01.vcd" nodelay noscene
}
Rule aghanim_CustomIsAghanimLosesIsAscension3_Rule
{
criteria Custom Isaghanim IsAghanimLoses IsAscension3
response aghanim_CustomIsAghanimLosesIsAscension3
}

View File

@@ -1,164 +0,0 @@
// This is the base rule script file for the AI response system for Expressive AI's who speak based on certain "Concepts"
// You can think of a concept as a high level state that the code is trying to convey, such as say hello, or say you're mad, etc.
//
// The format of this file is that there are five main types of commands:
// 1) #include "filename" // This just causes the included scriptfile to be parsed and added to the database
// 2) enumeration: this declares an enumerated type so that comparisons can be matched against the string versions of the type
// 3) response: this specifies a response to issue. A response consists of a weighted set of options and can recursively reference
// other responses by name
// 4) criterion: This is a match condition
// 5) rule: a rule consists of one or more criteria and a response
//
// In general, the system is presented with a criteria set, which is a set of key value pairs generated by the game code and
// various entity I/O and keyfields. For instance, the following criteria set was created in a map with a train terminal
// "speaker" entity wishing to fire random station announcements
// concept = 'train_speaker' (weight 5.000000) ; the high level concept for the search request
// map = 'terminal_pa' ; the name of the map
// classname = 'speaker' ; the classname and name of the "speaking" entity
// name = 'terminal_pa'
// health = '10' ; the absolute health of the speaking entity
// healthfrac = '0.000' ; the health fraction (health/maxhealth) of the speaking entity
// playerhealth = '100' ; similar data related to the current player:
// playerhealthfrac = '1.000'
// playerweapon = 'none' ; the name of the weapon the player is carrying
// playeractivity = 'ACT_WALK' ; animating activity of the player
// playerspeed = '0.000' ; how fast the player is moving
//
// Based on such a criteria set, the system checks each rule against the set. To do this, each criterion of the rule is
// given a numeric score as follows:
// score = 0 if criteria doesn't match or, criterion weight * keyvaliue weight if it does match
// The final score for a rule is the sum of all of the scores of its criteria. The best rule is the one with the highest
// score. Once a best rule is selected, then a response is looked up based on the response definitions and the engine is
// asked to dispatch that response.
//
// The specific syntax for the various keywords is as follows:
//
// ENUMERATIONS:
//
// enumeration <enumerationname>
// {
// "key1" "value1"
// "key2" "value2"
// ...etc.
// }
// The code and criteria refer to enumerations with square brackets and a double colon separator, e.g.:
// [enumerationname::key1]
//
//
// RESPONSES:
//
// Single line:
// response <responsegroupname> [nodelay | defaultdelay | delay interval ] [speakonce] [noscene] [odds nnn] [respeakdelay interval] [soundelvel "SNDLVL_xxx"] responsetype parameters
// Multiple lines
// response <responsegroupname>
// {
// [permitrepeats] ; optional parameter, by default we visit all responses in group before repeating any
// [sequential] ; optional parameter, by default we randomly choose responses, but with this we walk through the list starting at the first and going to the last
// [norepeat] ; Once we've run through all of the entries, disable the response group
// responsetype1 parameters1 [nodelay | defaultdelay | delay interval ] [speakonce] [odds nnn] [respeakdelay interval] [soundelvel "SNDLVL_xxx"] [displayfirst] [ displaylast ] weight nnn
// responsetype2 parameters2 [nodelay | defaultdelay | delay interval ] [speakonce] [odds nnn] [respeakdelay interval] [soundelvel "SNDLVL_xxx"] [displayfirst] [ displaylast ] weight nnn
// etc.
// }
// Where:
// interval = "startnumber,endnumber" or "number" (e.g., "2.8,3.2" or "3.2")
// responsetype =:
// speak ; it's an entry in sounds.txt
// sentence ; it's a sentence name from sentences.txt
// scene ; it's a .vcd file
// response ; it's a reference to another response group by name
// print ; print the text in developer 2 (for placeholder responses)
// nodelay = an additional delay of 0 after speaking
// defaultdelay = an additional delay of 2.8 to 3.2 seconds after speaking
// delay interval = an additional delay based on a random sample from the interval after speaking
// predelay interval = delays the speech for the time interval. NOTE: Only works on scenes (i.e. no sentences/speak/print)
// speakonce = don't use this response more than one time (default off)
// noscene = For an NPC, play the sound immediately using EmitSound, don't play it through the scene system. Good for playing sounds on dying or dead NPCs.
// odds = if this response is selected, if odds < 100, then there is a chance that nothing will be said (default 100)
// respeakdelay = don't use this response again for at least this long (default 0)
// soundlevel = use this soundlevel for the speak/sentence (default SNDLVL_TALKING)
// weight = if there are multiple responses, this is a selection weighting so that certain responses are favored over others in the group (default 1)
// displayfirst/displaylast : this should be the first/last item selected (ignores weight)
//
// CRITERIA:
//
// criterion <criterionname> <matchkey> <matchvalue> weight nnn required
// Where:
// matchkey matches one of the criteria in the set as shown above
// matchvalue is a string or number value or a range, the following are all valid:
// "0" ; numeric match to value 0
// "1" ; numeric match to value 1
// "weapon_smg1" ; string match to weapon_smg1 string
// "[npcstate::idle]" ; match enumeration by looking up numeric value
// ">0" ; match if greater than zero
// ">10,<=50" ; match if greater than ten and less than or equal to 50
// ">0,<[npcstate::alert]" ; match if greater than zer and les then value of enumeration for alert
// "!=0" ; match if not equal to zero
// weight = floating point weighting for score assuming criteria match (default value 1.0)
// required: if a rule has one or more criteria with the required flag set, then if any such criteria
// fail, the entire rule receives a score of zero
//
// RULE:
//
// rule <rulename>
// {
// criteria name1 [name2 name3 etc.]
// response responsegroupname [responsegroupname2 etc.]
// [matchonce] ; optional parameter
// [ <matchkey > <matchvalue> weight nnn required ]
// }
// Where:
// criteria just lies one more more criterion names from above and response list one or more of the response
// names from above (usually just one)
// matchonce (off by default): means that the rule is deactivated after the first time it is matched
// Note that additional "unnamed" criteria can be specified inline in the rule using the same syntax
// as for defining a criterion, except for the criterion keyword and the criterion name keys
//
// Interaction with entity I/O system
// CBaseEntity contains an inputfunc called "DispatchResponse" which accepts a string which is a concept name
// Thus, a game entity can fire this input on another entity with a concept string and a criteria set will
// be generated and searched against the entities current response system rule set.
// Right now only the speaker entity and NPC_Talker derived NPCs have any response rules loaded
// In addition, map placed entities have up to three "context" keypairs that can be specified.
// They take the form: "key:value" (key, single colon separator, value)
// When an entity with any such context keypairs is asked to dispatch a response, the keypairs are added to the
// criteria set passed to the rule system. Thus, map placed entities and triggers can specify their
// own context keypairs and these can be hooked up to response rules to do map-specific and appropriate
// responses
// In addition, entity I/O can be used to add, remove and clear any such context keypairs via the
// AddContext, RemoveContext, and ClearContext input functions.
// AddContext takes a keypair of the "key:value" format, while RemoveContext take just the "key"
// ClearContext removes all context keypairs
// The game .dll code can enumerate context keypairs and change them via code based methods
//
// The player and the world have their context added with the string player or world as a prefix, e.g.:
// "playerkey:value" or "worldkey:value" to differentiate world/player context from the context of the
// responding entity.
criterion "Custom" "Concept" "TLK_DOTA_CUSTOM" required
criterion "Followup_Positive" "Concept" "TLK_DOTA_FOLLOWUP_POSITIVE" required
criterion "Followup_Negative" "Concept" "TLK_DOTA_FOLLOWUP_NEGATIVE" required
criterion "Followup_Negative_Ongoing" "Concept" "TLK_DOTA_FOLLOWUP_NEGATIVE_ONGOING" required
criterion "Followup_Generic" "Concept" "TLK_DOTA_FOLLOWUP_GENERIC" required
criterion "Chance_1%" "randomnum" "99" required
criterion "Chance_2%" "randomnum" ">=97,<=98" required
criterion "Chance_3%" "randomnum" ">=94,<=96" required
criterion "Chance_5%" "randomnum" ">=89,<=93" required
criterion "Chance_10%" "randomnum" ">=79,<=88" required
criterion "Chance_12%" "randomnum" "<=12" required
criterion "Chance_15%" "randomnum" ">=64,<=78" required
criterion "Chance_20%" "randomnum" "<=20" required
criterion "Chance_25%" "randomnum" "<=25" required
criterion "Chance_30%" "randomnum" "<=30" required
criterion "Chance_35%" "randomnum" "<=35" required
criterion "Chance_40%" "randomnum" "<=40" required
criterion "Chance_45%" "randomnum" "<=45" required
criterion "Chance_50%" "randomnum" "<=50" required
criterion "Chance_55%" "randomnum" "<=55" required
criterion "Chance_60%" "randomnum" "<=60" required
criterion "Chance_65%" "randomnum" "<=65" required
criterion "Chance_70%" "randomnum" "<=70" required
criterion "Chance_75%" "randomnum" "<=75" required
#include "talker/response_rules_announcer_aghanim.txt"
#include "talker/response_rules_aghanim.txt"

View File

@@ -1,11 +0,0 @@
ability_absolute_no_cc = class( {} )
LinkLuaModifier( "modifier_absolute_no_cc", "modifiers/modifier_absolute_no_cc", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------------------
function ability_absolute_no_cc:GetIntrinsicModifierName()
return "modifier_absolute_no_cc"
end
--------------------------------------------------------------------------------

View File

@@ -1,11 +0,0 @@
ability_ascension = class( {} )
LinkLuaModifier( "modifier_ascension", "modifiers/modifier_ascension", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------------------
function ability_ascension:GetIntrinsicModifierName()
return "modifier_ascension"
end
--------------------------------------------------------------------------------

View File

@@ -1,9 +0,0 @@
ability_attack_speed_unslowable = class( {} )
LinkLuaModifier( "modifier_attack_speed_unslowable", "modifiers/modifier_attack_speed_unslowable", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------------------
function ability_attack_speed_unslowable:GetIntrinsicModifierName()
return "modifier_attack_speed_unslowable"
end

View File

@@ -1,9 +0,0 @@
ability_move_speed_unslowable = class( {} )
LinkLuaModifier( "modifier_move_speed_unslowable", "modifiers/modifier_move_speed_unslowable", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------------------
function ability_move_speed_unslowable:GetIntrinsicModifierName()
return "modifier_move_speed_unslowable"
end

View File

@@ -1,8 +0,0 @@
aggro_on_damage = class({})
LinkLuaModifier( "modifier_aggro_on_damage", "modifiers/modifier_aggro_on_damage", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------------------
function aggro_on_damage:GetIntrinsicModifierName()
return "modifier_aggro_on_damage"
end

View File

@@ -1,11 +0,0 @@
ascension_armor = class( {} )
LinkLuaModifier( "modifier_ascension_armor", "modifiers/modifier_ascension_armor", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------------------
function ascension_armor:GetIntrinsicModifierName()
return "modifier_ascension_armor"
end
--------------------------------------------------------------------------------

View File

@@ -1,70 +0,0 @@
ascension_armor_sapping = class({})
LinkLuaModifier( "modifier_ascension_armor_sapping", "modifiers/modifier_ascension_armor_sapping", LUA_MODIFIER_MOTION_NONE )
LinkLuaModifier( "modifier_ascension_armor_sapping_display", "modifiers/modifier_ascension_armor_sapping_display", LUA_MODIFIER_MOTION_NONE )
LinkLuaModifier( "modifier_ascension_armor_sapping_instance", "modifiers/modifier_ascension_armor_sapping_instance", LUA_MODIFIER_MOTION_NONE )
-----------------------------------------------------------------------------------------
function ascension_armor_sapping:Precache( context )
PrecacheResource( "particle", "particles/units/heroes/hero_undying/undying_decay_strength_xfer.vpcf", context )
PrecacheResource( "particle", "particles/ascension/ascension_armor_sapping_target.vpcf", context )
PrecacheResource( "particle", "particles/items2_fx/medallion_of_courage.vpcf", context )
end
--------------------------------------------------------------------------------
function ascension_armor_sapping:Spawn()
-- So the modifier can be seen
if IsServer() == true then
self:GetCaster():AddNewModifier( self:GetCaster(), self, "modifier_ascension_armor_sapping_display", nil )
end
end
--------------------------------------------------------------------------------
function ascension_armor_sapping:OnSpellStart()
if not IsServer() then
return
end
local hTarget = self:GetCursorTarget()
if hTarget == nil then
return
end
local nSapFX = ParticleManager:CreateParticle( "particles/units/heroes/hero_undying/undying_decay_strength_xfer.vpcf", PATTACH_CUSTOMORIGIN, self:GetCaster() )
ParticleManager:SetParticleControlEnt( nSapFX, 0, hTarget, PATTACH_POINT_FOLLOW, "attach_hitloc", hTarget:GetAbsOrigin(), true )-- CP0: Target
ParticleManager:SetParticleControlEnt( nSapFX, 1, self:GetCaster(), PATTACH_POINT_FOLLOW, "attach_hitloc", self:GetCaster():GetAbsOrigin(), true )-- CP1: Caster
ParticleManager:SetParticleControlEnt( nSapFX, 2, self:GetCaster(), PATTACH_POINT_FOLLOW, "attach_hitloc", self:GetCaster():GetAbsOrigin(), true )-- CP2: Caster's hand
ParticleManager:ReleaseParticleIndex( nSapFX );
local nSapTargetFX = ParticleManager:CreateParticle( "particles/ascension/ascension_armor_sapping_target.vpcf", PATTACH_ABSORIGIN_FOLLOW, hTarget )
ParticleManager:ReleaseParticleIndex( nSapTargetFX );
EmitSoundOn( "Ability.ArmorSapping.Target", hTarget );
local nDuration = self:GetSpecialValueFor( "duration" )
local kv =
{
duration = nDuration
}
local hDebuff = hTarget:AddNewModifier( self:GetCaster(), self, "modifier_ascension_armor_sapping_instance", kv )
if hDebuff == nil then
return
end
-- add debuff counter
local hDebuffCounter = hTarget:FindModifierByName( "modifier_ascension_armor_sapping" )
if hDebuffCounter == nil then
hDebuffCounter = hTarget:AddNewModifier( self:GetCaster(), self, "modifier_ascension_armor_sapping", nil )
end
if hDebuffCounter ~= nil then
hDebuffCounter:SetDuration( nDuration, true );
hDebuffCounter:SetStackCount( hDebuffCounter:GetStackCount() + 1 )
end
end

View File

@@ -1,23 +0,0 @@
ascension_attack_speed = class( {} )
LinkLuaModifier( "modifier_ascension_attack_speed", "modifiers/modifier_ascension_attack_speed", LUA_MODIFIER_MOTION_NONE )
-----------------------------------------------------------------------------------------
function ascension_attack_speed:Precache( context )
PrecacheResource( "particle", "particles/items2_fx/mask_of_madness.vpcf", context )
end
--------------------------------------------------------------------------------
function ascension_attack_speed:OnSpellStart()
if not IsServer() then
return
end
local flDuration = self:GetSpecialValueFor( "duration" )
self:GetCaster():AddNewModifier( self:GetCaster(), self, "modifier_ascension_attack_speed", { duration = flDuration } )
end

View File

@@ -1,28 +0,0 @@
ascension_bomb = class({})
LinkLuaModifier( "modifier_bomber_death_explosion", "modifiers/creatures/modifier_bomber_death_explosion", LUA_MODIFIER_MOTION_NONE )
-----------------------------------------------------------------------------------------
function ascension_bomb:Precache( context )
PrecacheResource( "particle", "particles/units/heroes/hero_techies/techies_remote_mines_detonate.vpcf", context )
PrecacheResource( "particle", "particles/dark_moon/darkmoon_calldown_marker_ring.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_gyrocopter/gyro_guided_missile_target.vpcf", context )
end
--------------------------------------------------------------------------------
function ascension_bomb:OnSpellStart()
if not IsServer() then
return
end
local hTarget = self:GetCursorTarget()
if hTarget == nil then
return
end
hTarget:AddNewModifier( hTarget, self, "modifier_bomber_death_explosion", {} )
end

View File

@@ -1,18 +0,0 @@
ascension_chilling_touch = class( {} )
LinkLuaModifier( "modifier_ascension_chilling_touch", "modifiers/modifier_ascension_chilling_touch", LUA_MODIFIER_MOTION_NONE )
-----------------------------------------------------------------------------------------
function ascension_chilling_touch:Precache( context )
PrecacheResource( "particle", "particles/generic_gameplay/generic_slowed_cold.vpcf", context )
PrecacheResource( "particle", "particles/status_fx/status_effect_frost.vpcf", context )
end
--------------------------------------------------------------------------------
function ascension_chilling_touch:GetIntrinsicModifierName()
return "modifier_ascension_chilling_touch"
end
--------------------------------------------------------------------------------

View File

@@ -1,19 +0,0 @@
ascension_crit = class( {} )
LinkLuaModifier( "modifier_ascension_crit", "modifiers/modifier_ascension_crit", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------------------
function ascension_crit:Precache( context )
PrecacheResource( "particle", "particles/units/heroes/hero_phantom_assassin/phantom_assassin_crit_impact.vpcf", context )
end
--------------------------------------------------------------------------------
function ascension_crit:GetIntrinsicModifierName()
return "modifier_ascension_crit"
end
--------------------------------------------------------------------------------

View File

@@ -1,11 +0,0 @@
ascension_damage = class( {} )
LinkLuaModifier( "modifier_ascension_damage", "modifiers/modifier_ascension_damage", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------------------
function ascension_damage:GetIntrinsicModifierName()
return "modifier_ascension_damage"
end
--------------------------------------------------------------------------------

View File

@@ -1,40 +0,0 @@
ascension_drunken = class( {} )
LinkLuaModifier( "modifier_ascension_drunken_display", "modifiers/modifier_ascension_drunken_display", LUA_MODIFIER_MOTION_NONE )
-----------------------------------------------------------------------------------------
function ascension_drunken:Precache( hContext )
PrecacheResource( "soundfile", "soundevents/game_sounds_heroes/game_sounds_brewmaster.vsndevts", hContext )
PrecacheResource( "particle", "particles/status_fx/status_effect_drunken_brawler.vpcf", hContext )
PrecacheResource( "particle", "particles/units/heroes/hero_brewmaster/brewmaster_drunkenbrawler_evade.vpcf", hContext )
PrecacheResource( "particle", "particles/units/heroes/hero_brewmaster/brewmaster_drunkenbrawler_crit.vpcf", hContext )
end
--------------------------------------------------------------------------------
function ascension_drunken:Spawn()
-- So the modifier can be seen
if IsServer() == true then
self:GetCaster():AddNewModifier( self:GetCaster(), self, "modifier_ascension_drunken_display", nil )
end
end
--------------------------------------------------------------------------------
function ascension_drunken:OnSpellStart()
if not IsServer() then
return
end
--print( "casting drunken ")
EmitSoundOn( "Hero_Brewmaster.Brawler.Cast", self:GetCaster() )
local flDuration = self:GetSpecialValueFor( "duration" )
self:GetCaster():AddNewModifier( self:GetCaster(), self, "modifier_brewmaster_drunken_brawler", { duration = flDuration } )
end

View File

@@ -1,18 +0,0 @@
ascension_extra_fast = class( {} )
LinkLuaModifier( "modifier_ascension_extra_fast", "modifiers/modifier_ascension_extra_fast", LUA_MODIFIER_MOTION_NONE )
function ascension_extra_fast:Precache( context )
PrecacheResource( "particle", "particles/units/heroes/hero_dark_seer/dark_seer_surge.vpcf", context )
end
--------------------------------------------------------------------------------
function ascension_extra_fast:GetIntrinsicModifierName()
return "modifier_ascension_extra_fast"
end
--------------------------------------------------------------------------------

View File

@@ -1,55 +0,0 @@
ascension_flicker = class( {} )
LinkLuaModifier( "modifier_ascension_flicker_display", "modifiers/modifier_ascension_flicker_display", LUA_MODIFIER_MOTION_NONE )
-----------------------------------------------------------------------------------------
function ascension_flicker:Precache( context )
PrecacheResource( "particle", "particles/items_fx/blink_dagger_start.vpcf", context )
PrecacheResource( "particle", "particles/items_fx/blink_dagger_end.vpcf", context )
end
--------------------------------------------------------------------------------
function ascension_flicker:Spawn()
-- So the modifier can be seen
if IsServer() == true then
self:GetCaster():AddNewModifier( self:GetCaster(), self, "modifier_ascension_flicker_display", nil )
end
end
--------------------------------------------------------------------------------
function ascension_flicker:OnSpellStart()
if not IsServer() then
return
end
local range = self:GetSpecialValueFor( "range" )
local nAttempts = 0
local vEndPos = self:GetCaster():GetAbsOrigin() + RandomVector( 1 ) * range;
while ( ( not GridNav:CanFindPath( self:GetCaster():GetOrigin(), vEndPos ) ) and ( nAttempts < 5 ) ) do
vEndPos = self:GetCaster():GetOrigin() + RandomVector( 1 ) * range;
nAttempts = nAttempts + 1
if nAttempts >= 5 then
vEndPos = self:GetCaster():GetAbsOrigin()
end
end
local nFXStart = ParticleManager:CreateParticle( "particles/items_fx/blink_dagger_start.vpcf", PATTACH_CUSTOMORIGIN, nil )
ParticleManager:SetParticleControl( nFXStart, 0, self:GetCaster():GetAbsOrigin() )
ParticleManager:ReleaseParticleIndex( nFXStart )
FindClearSpaceForUnit( self:GetCaster(), vEndPos, true )
ProjectileManager:ProjectileDodge( self:GetCaster() )
EmitSoundOn( "DOTA_Item.BlinkDagger.Activate", self:GetCaster() )
self:GetCaster():Purge( false, true, false, false, false )
local nFXEnd = ParticleManager:CreateParticle( "particles/items_fx/blink_dagger_end.vpcf", PATTACH_ABSORIGIN_FOLLOW, self:GetCaster() )
ParticleManager:ReleaseParticleIndex( nFXEnd )
end

View File

@@ -1,18 +0,0 @@
ascension_heal_suppression = class({})
LinkLuaModifier( "modifier_ascension_heal_suppression", "modifiers/modifier_ascension_heal_suppression", LUA_MODIFIER_MOTION_NONE )
LinkLuaModifier( "modifier_ascension_heal_suppression_aura", "modifiers/modifier_ascension_heal_suppression_aura", LUA_MODIFIER_MOTION_NONE )
-----------------------------------------------------------------------------------------
function ascension_heal_suppression:Precache( context )
PrecacheResource( "particle", "particles/items4_fx/spirit_vessel_damage.vpcf", context )
PrecacheResource( "particle", "particles/status_fx/status_effect_necrolyte_spirit.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_necrolyte/necrolyte_spirit.vpcf", context )
end
--------------------------------------------------------------------------------
function ascension_heal_suppression:GetIntrinsicModifierName()
return "modifier_ascension_heal_suppression_aura"
end

View File

@@ -1,24 +0,0 @@
ascension_magic_immunity = class( {} )
LinkLuaModifier( "modifier_ascension_magic_immunity", "modifiers/modifier_ascension_magic_immunity", LUA_MODIFIER_MOTION_NONE )
-----------------------------------------------------------------------------------------
function ascension_magic_immunity:Precache( hContext )
PrecacheResource( "particle", "particles/items_fx/black_king_bar_avatar.vpcf", hContext )
PrecacheResource( "particle", "particles/status_fx/status_effect_avatar.vpcf", hContext )
end
--------------------------------------------------------------------------------
function ascension_magic_immunity:OnSpellStart()
if not IsServer() then
return
end
local flDuration = self:GetSpecialValueFor( "duration" )
self:GetCaster():AddNewModifier( self:GetCaster(), self, "modifier_ascension_magic_immunity", { duration = flDuration } )
end

View File

@@ -1,11 +0,0 @@
ascension_magic_resist = class( {} )
LinkLuaModifier( "modifier_ascension_magic_resist", "modifiers/modifier_ascension_magic_resist", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------------------
function ascension_magic_resist:GetIntrinsicModifierName()
return "modifier_ascension_magic_resist"
end
--------------------------------------------------------------------------------

View File

@@ -1,28 +0,0 @@
ascension_vampiric = class( {} )
LinkLuaModifier( "modifier_ascension_vampiric", "modifiers/modifier_ascension_vampiric", LUA_MODIFIER_MOTION_NONE )
-----------------------------------------------------------------------------------------
function ascension_vampiric:Precache( context )
PrecacheResource( "particle", "particles/items2_fx/satanic_buff.vpcf", context )
PrecacheResource( "particle", "particles/status_fx/status_effect_life_stealer_rage.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_life_stealer/life_stealer_rage.vpcf", context )
PrecacheResource( "particle", "particles/items3_fx/octarine_core_lifesteal.vpcf", context )
PrecacheResource( "particle", "particles/generic_gameplay/generic_lifesteal.vpcf", context )
end
--------------------------------------------------------------------------------
function ascension_vampiric:OnSpellStart()
if not IsServer() then
return
end
EmitSoundOn( "DOTA_Item.Satanic.Activate", self:GetCaster() )
local flDuration = self:GetSpecialValueFor( "duration" )
self:GetCaster():AddNewModifier( self:GetCaster(), self, "modifier_ascension_vampiric", { duration = flDuration } )
end

View File

@@ -1,11 +0,0 @@
breakable_container = class({})
LinkLuaModifier( "modifier_breakable_container", "modifiers/modifier_breakable_container", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------------------
function breakable_container:GetIntrinsicModifierName()
return "modifier_breakable_container"
end
--------------------------------------------------------------------------------

View File

@@ -1,13 +0,0 @@
aghanim_announcer_passive = class({})
LinkLuaModifier( "modifier_aghanim_announcer_passive", "modifiers/creatures/modifier_aghanim_announcer_passive", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------------------
function aghanim_announcer_passive:GetIntrinsicModifierName()
return "modifier_aghanim_announcer_passive"
end
--------------------------------------------------------------------------------

View File

@@ -1,75 +0,0 @@
aghanim_blink = class{}
----------------------------------------------------------------------------------------
function aghanim_blink:Precache( context )
PrecacheResource( "particle", "particles/creatures/aghanim/aghanim_preimage.vpcf", context )
PrecacheResource( "soundfile", "soundevents/game_sounds_heroes/game_sounds_faceless_void.vsndevts", context )
end
----------------------------------------------------------------------------------------
function aghanim_blink:OnSpellStart()
if IsServer() == false then
return
end
local vPos = self:GetCursorPosition()
local vDirection = vPos - self:GetCaster():GetOrigin()
local flDist = vDirection:Length2D()
vDirection.z = 0.0
vDirection = vDirection:Normalized()
--local nFXIndex = ParticleManager:CreateParticle( "particles/creatures/aghanim/aghanim_preimage.vpcf", PATTACH_CUSTOMORIGIN, nil )--
--ParticleManager:SetParticleControl( nFXIndex, 0, self:GetCaster():GetAbsOrigin() )
--ParticleManager:SetParticleControl( nFXIndex, 1, vPos )
--ParticleManager:SetParticleControlEnt( nFXIndex, 2, self:GetCaster(), PATTACH_ABSORIGIN_FOLLOW, nil, self:GetCaster():GetAbsOrigin(), true )
--ParticleManager:SetParticleFoWProperties( nFXIndex, 0, 2, 64.0 )
--ParticleManager:ReleaseParticleIndex( nFXIndex )
self.vStartLocation = self:GetCaster():GetAbsOrigin()
local info =
{
Ability = self,
vSpawnOrigin = self:GetCaster():GetOrigin(),
fStartRadius = 0,
fEndRadius = 0,
vVelocity = vDirection * flDist,
fDistance = flDist,
Source = self:GetCaster(),
--iUnitTargetTeam = DOTA_UNIT_TARGET_TEAM_NONE,
--iUnitTargetType = DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC + DOTA_UNIT_TARGET_BUILDING,
}
ProjectileManager:CreateLinearProjectile( info )
EmitSoundOn( "Hero_FacelessVoid.TimeWalk", self:GetCaster() )
end
----------------------------------------------------------------------------------------
function aghanim_blink:OnProjectileHit( hTarget, vLocation )
if IsServer() then
local vDirection = vLocation - self:GetCaster():GetAbsOrigin()
vDirection.z = 0.0
vDirection = vDirection:Normalized()
EmitSoundOn( "Hero_FacelessVoid.TimeWalk", self:GetCaster() )
FindClearSpaceForUnit( self:GetCaster(), vLocation, true )
--self:GetCaster():FaceTowards( self:GetCaster().vHomePosition )
ProjectileManager:ProjectileDodge( self:GetCaster() )
local nFXIndex = ParticleManager:CreateParticle( "particles/creatures/aghanim/aghanim_preimage.vpcf", PATTACH_CUSTOMORIGIN, nil )
ParticleManager:SetParticleControl( nFXIndex, 0, self.vStartLocation )
ParticleManager:SetParticleControl( nFXIndex, 1, self:GetCaster():GetAbsOrigin() )
ParticleManager:SetParticleControlEnt( nFXIndex, 2, self:GetCaster(), PATTACH_ABSORIGIN_FOLLOW, nil, self.vStartLocation, true )
ParticleManager:SetParticleFoWProperties( nFXIndex, 0, 2, 64.0 )
ParticleManager:ReleaseParticleIndex( nFXIndex )
end
return true
end
----------------------------------------------------------------------------------------

View File

@@ -1,170 +0,0 @@
aghanim_crystal_attack = class({})
_G.CRYSTAL_ATTACKS_PHASE = {}
_G.CRYSTAL_ATTACKS_PHASE[1] = 0
_G.CRYSTAL_ATTACKS_PHASE[2] = 1
_G.CRYSTAL_ATTACKS_PHASE[3] = 2
_G.CRYSTAL_ATTACKS_PHASE[4] = 0
_G.CRYSTAL_ATTACKS_PHASE[5] = 1
_G.CRYSTAL_ATTACKS_PHASE[6] = 2
_G.CRYSTAL_ATTACKS_COOLDOWN = 10.0
LinkLuaModifier( "modifier_aghanim_crystal_attack_active", "modifiers/creatures/modifier_aghanim_crystal_attack_active", LUA_MODIFIER_MOTION_NONE )
LinkLuaModifier( "modifier_aghanim_crystal_attack_debuff", "modifiers/creatures/modifier_aghanim_crystal_attack_debuff", LUA_MODIFIER_MOTION_NONE )
----------------------------------------------------------------------------------------
function aghanim_crystal_attack:Precache( context )
PrecacheResource( "particle", "particles/creatures/aghanim/aghanim_crystal_attack.vpcf", context )
PrecacheResource( "particle", "particles/creatures/aghanim/aghanim_crystal_attack_telegraph.vpcf", context )
PrecacheResource( "particle", "particles/creatures/aghanim/aghanim_crystal_attack_impact.vpcf", context )
PrecacheResource( "particle", "particles/status_fx/status_effect_iceblast.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_ancient_apparition/ancient_apparition_ice_blast_debuff.vpcf", context )
PrecacheResource( "soundfile", "soundevents/game_sounds_heroes/game_sounds_winter_wyvern.vsndevts", context )
PrecacheResource( "soundfile", "soundevents/game_sounds_heroes/game_sounds_mars.vsndevts", context )
PrecacheResource( "soundfile", "soundevents/game_sounds_heroes/game_sounds_leshrac.vsndevts", context )
PrecacheResource( "soundfile", "soundevents/game_sounds_heroes/game_sounds_lich.vsndevts", context )
PrecacheResource( "particle", "particles/creatures/aghanim/aghanim_self_dmg.vpcf", context )
PrecacheResource( "particle", "particles/creatures/aghanim/aghanim_pulse_nova.vpcf", context )
PrecacheResource( "particle", "particles/creatures/aghanim/aghanim_pulse_ambient.vpcf", context )
self.nPhase = 1
end
--------------------------------------------------------------------------------
function aghanim_crystal_attack:OnSpellStart()
if IsServer() then
if self.nPhase == 1 then
self.hActiveBuff = self:GetCaster():AddNewModifier( self:GetCaster(), self, "modifier_aghanim_crystal_attack_active", {} )
end
self.attack_time = self:GetSpecialValueFor( "attack_time" )
self.attack_damage = self:GetSpecialValueFor( "attack_damage" )
self.explosion_radius = self:GetSpecialValueFor( "explosion_radius" )
self.pulse_radius = self:GetSpecialValueFor( "pulse_radius" )
local enemies = FindUnitsInRadius( self:GetCaster():GetTeamNumber(), self:GetCaster():GetAbsOrigin(), nil, 10000, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_HERO, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES, FIND_FARTHEST, false )
local nCrystalsLeft = CRYSTAL_ATTACKS_PHASE[ self.nPhase ] + 1
for _,enemy in pairs( enemies ) do
local flDist = ( enemy:GetAbsOrigin() - self:GetCaster():GetAbsOrigin() ):Length2D()
if flDist > self.pulse_radius then
self:LaunchCrystals( enemy:GetAbsOrigin() + ( enemy:GetForwardVector() * self.pulse_radius * 0.5 ) )
nCrystalsLeft = nCrystalsLeft - 1
if nCrystalsLeft == 0 then
break
end
end
end
self.nPhase = self.nPhase + 1
if self.hActiveBuff then
self.hActiveBuff:Pulse()
end
if self.nPhase > 6 then
self.nPhase = 1
self:StartCooldown( CRYSTAL_ATTACKS_COOLDOWN )
self.hActiveBuff:Destroy()
end
end
end
--------------------------------------------------------------------------------
function aghanim_crystal_attack:LaunchCrystals( vPos )
local vDirection = vPos - self:GetCaster():GetAttachmentOrigin( self:GetCaster():ScriptLookupAttachment( "attach_staff_fx" ) )
local flDist2d = vDirection:Length2D()
local flDist = vDirection:Length()
vDirection = vDirection:Normalized()
vDirection.z = 0.0
local flSpeed = flDist / self.attack_time
local info =
{
EffectName = "particles/creatures/aghanim/aghanim_crystal_attack.vpcf",
Ability = self,
vSpawnOrigin = self:GetCaster():GetAttachmentOrigin( self:GetCaster():ScriptLookupAttachment( "attach_staff_fx" ) ),
fStartRadius = 0,
fEndRadius = 0,
vVelocity = vDirection * flSpeed,
fDistance = flDist2d,
Source = self:GetCaster(),
iUnitTargetTeam = DOTA_UNIT_TARGET_TEAM_ENEMY,
iUnitTargetType = DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC,
}
ProjectileManager:CreateLinearProjectile( info )
EmitSoundOn( "Hero_Winter_Wyvern.SplinterBlast.Splinter", self:GetCaster() )
local nFXIndex = ParticleManager:CreateParticle( "particles/creatures/aghanim/aghanim_crystal_attack_telegraph.vpcf", PATTACH_CUSTOMORIGIN, nil )
ParticleManager:SetParticleControl( nFXIndex, 0, vPos )
ParticleManager:SetParticleControl( nFXIndex, 1, Vector( self.explosion_radius, self.attack_time, self.attack_time ) )
ParticleManager:SetParticleControl( nFXIndex, 15, Vector( 214, 236, 239 ) )
ParticleManager:SetParticleControl( nFXIndex, 16, Vector( 1, 0, 0 ) )
ParticleManager:ReleaseParticleIndex( nFXIndex )
end
--------------------------------------------------------------------------------
function aghanim_crystal_attack:OnProjectileHit( hTarget, vLocation )
if IsServer() then
if hTarget ~= nil then
return false
end
local knockback_duration = self:GetSpecialValueFor( "knockback_duration" )
local knockback_distance = self:GetSpecialValueFor( "knockback_distance" )
local knockback_height = self:GetSpecialValueFor( "knockback_height" )
local debuff_duration = self:GetSpecialValueFor( "debuff_duration" )
local vPosOnGround = GetGroundPosition( vLocation, self:GetCaster() )
EmitSoundOnLocationWithCaster( vPosOnGround, "Hero_Winter_Wyvern.SplinterBlast.Target", self:GetCaster() )
local nDetonationFX = ParticleManager:CreateParticle( "particles/creatures/aghanim/aghanim_crystal_attack_impact.vpcf", PATTACH_WORLDORIGIN, nil )
ParticleManager:SetParticleControl( nDetonationFX, 0, vPosOnGround )
ParticleManager:SetParticleControl( nDetonationFX, 1, Vector( self.explosion_radius, self.explosion_radius, self.explosion_radius ) )
ParticleManager:ReleaseParticleIndex( nDetonationFX )
local enemies = FindUnitsInRadius( self:GetCaster():GetTeamNumber(), vPosOnGround, nil, self.explosion_radius, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC + DOTA_UNIT_TARGET_BUILDING, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES, FIND_CLOSEST, false )
for _,enemy in pairs( enemies ) do
if enemy ~= nil and enemy:IsInvulnerable() == false and enemy:IsMagicImmune() == false then
local kv =
{
center_x = vPosOnGround.x,
center_y = vPosOnGround.y,
center_z = vPosOnGround.z,
should_stun = true,
duration = knockback_duration,
knockback_duration = knockback_duration,
knockback_distance = knockback_distance,
knockback_height = knockback_height,
}
enemy:AddNewModifier( self:GetCaster(), self, "modifier_knockback", kv )
--enemy:AddNewModifier( self:GetCaster(), self, "modifier_aghanim_crystal_attack_debuff", { duration = debuff_duration } )
local damage = {
victim = enemy,
attacker = self:GetCaster(),
damage = self.attack_damage,
damage_type = DAMAGE_TYPE_PHYSICAL,
ability = self
}
ApplyDamage( damage )
end
end
end
return true
end
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

View File

@@ -1,17 +0,0 @@
aghanim_passive = class( {} )
LinkLuaModifier( "modifier_aghanim_passive", "modifiers/creatures/modifier_aghanim_passive", LUA_MODIFIER_MOTION_NONE )
----------------------------------------------------------------------------------------
function aghanim_passive:Precache( context )
PrecacheResource( "particle", "particles/creatures/aghanim/aghanim_outro_linger.vpcf", context )
end
--------------------------------------------------------------------------------
function aghanim_passive:GetIntrinsicModifierName()
return "modifier_aghanim_passive"
end
--------------------------------------------------------------------------------

View File

@@ -1,326 +0,0 @@
aghanim_shard_attack = class( {} )
LinkLuaModifier( "modifier_aghanim_shard_attack", "modifiers/creatures/modifier_aghanim_shard_attack", LUA_MODIFIER_MOTION_NONE )
_G.PATTERN_SPIRAL = 0
_G.PATTERN_REBOUND = 1
_G.PATTERN_JITTER = 2
_G.CAST_ESCLATION_PCT = 17
_G.FAST_COLOR = Vector( 0, 0, 255 )
_G.SLOW_COLOR = Vector( 350, 0, 0 ) -- looks weird, but it's because it can't go to 0 speed
_G.HEAL_COLOR = Vector( 0, 255, 0 )
----------------------------------------------------------------------------------------
function aghanim_shard_attack:Precache( context )
PrecacheResource( "particle", "particles/creatures/aghanim/aghanim_shard_channel.vpcf", context )
PrecacheResource( "particle", "particles/creatures/aghanim/aghanim_shard_proj.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_lich/lich_frost_nova.vpcf", context )
PrecacheResource( "soundfile", "soundevents/game_sounds_heroes/game_sounds_dark_willow.vsndevts", context )
PrecacheResource( "soundfile", "soundevents/game_sounds_heroes/game_sounds_silencer.vsndevts", context )
self.nPattern = PATTERN_SPIRAL
self.nCastCount = 0
self.Projectiles = {}
end
----------------------------------------------------------------------------------------
function aghanim_shard_attack:ProcsMagicStick()
return false
end
--------------------------------------------------------------------------------
function aghanim_shard_attack:OnAbilityPhaseStart()
if IsServer() then
StartSoundEventFromPositionReliable( "Aghanim.ShardAttack.Channel", self:GetCaster():GetAbsOrigin() )
self.nChannelFX = ParticleManager:CreateParticle( "particles/creatures/aghanim/aghanim_shard_channel.vpcf", PATTACH_ABSORIGIN_FOLLOW, self:GetCaster() )
end
return true
end
-------------------------------------------------------------------------------
function aghanim_shard_attack:OnChannelThink( flInterval )
if IsServer() then
if self.nPattern == PATTERN_SPIRAL then
self:ThinkSpirals( flInterval )
end
end
end
-------------------------------------------------------------------------------
function aghanim_shard_attack:OnChannelFinish( bInterrupted )
if IsServer() then
StopSoundOn( "Aghanim.ShardAttack.Loop", self:GetCaster() )
ParticleManager:DestroyParticle( self.nChannelFX, false )
self.nCastCount = self.nCastCount + 1
end
end
-------------------------------------------------------------------------------
function aghanim_shard_attack:OnSpellStart()
if IsServer() then
EmitSoundOn( "Aghanim.ShardAttack.Loop", self:GetCaster() )
if self.nPattern == PATTERN_SPIRAL then
self:BeginSpirals()
end
if self.nPattern == PATTERN_REBOUND then
self:BeginRebound()
end
if self.nPattern == PATTERN_JITTER then
self:BeginJitter()
end
end
end
-------------------------------------------------------------------------------
function aghanim_shard_attack:BeginSpirals()
self.Projectiles = {}
self.spiral_projectiles = self:GetSpecialValueFor( "spiral_projectiles" )
self.spiral_projectile_waves = self:GetSpecialValueFor( "spiral_projectile_waves" )
self.spiral_projectile_speed = self:GetSpecialValueFor( "spiral_projectile_speed" )
self.spiral_projectiles = math.min( self.spiral_projectiles * 2, math.floor( self.spiral_projectiles + ( self.spiral_projectiles * CAST_ESCLATION_PCT * self.nCastCount / 100 ) ) )
self.spiral_projectile_waves = math.min( self.spiral_projectile_waves * 2, math.floor( self.spiral_projectile_waves + ( self.spiral_projectile_waves * CAST_ESCLATION_PCT * self.nCastCount / 100 ) ) )
self.spiral_projectile_speed = math.min( self.spiral_projectile_speed * 2, math.floor( self.spiral_projectile_speed + ( self.spiral_projectile_speed * CAST_ESCLATION_PCT * self.nCastCount / 100 ) ) )
self.spiral_projectile_rotation_speed = self:GetSpecialValueFor( "spiral_projectile_rotation_speed" )
self.spiral_projectile_width = self:GetSpecialValueFor( "spiral_projectile_width" )
self.spiral_projectile_damage = self:GetSpecialValueFor( "spiral_projectile_damage" )
self.spiral_projectile_speed_change_interval = self:GetSpecialValueFor( "spiral_projectile_speed_change_interval" )
self.flSpiralYaw = RandomInt( 0, 360 )
self.flSpiralWaveInterval = self:GetChannelTime() / self.spiral_projectile_waves
self.flSpiralNextWaveTime = GameRules:GetGameTime()
self.flSpiralYawStep = 360 / self.spiral_projectiles
self.bReverse = false
if RandomInt( 0, 1 ) == 1 then
self.bReverse = true
end
self.flSpiralSpeedToggleTime = GameRules:GetGameTime() + self.spiral_projectile_speed_change_interval
self.bSpiralSpeedingUp = true
self.flCurSpeed = self.spiral_projectile_speed
self.nToggleCount = 0
end
-------------------------------------------------------------------------------
function aghanim_shard_attack:ThinkSpirals( flInterval )
local flNow = GameRules:GetGameTime()
if flNow > self.flSpiralSpeedToggleTime then
self.flSpiralSpeedToggleTime = flNow + self.spiral_projectile_speed_change_interval
self.bSpiralSpeedingUp = not self.bSpiralSpeedingUp
self.nToggleCount = self.nToggleCount + 1
if self.nToggleCount == 2 then
self.bReverse = not self.bReverse
self.nToggleCount = 0
end
end
local flRate = ( self.spiral_projectile_speed / self.spiral_projectile_speed_change_interval ) * flInterval
if self.bSpiralSpeedingUp then
self.flCurSpeed = math.min( self.spiral_projectile_speed, self.flCurSpeed + flRate )
else
self.flCurSpeed = math.max( 100, self.flCurSpeed - flRate )
end
if self.flSpiralNextWaveTime > flNow then
return
end
self.flSpiralNextWaveTime = flNow + self.flSpiralWaveInterval
EmitSoundOn( "Aghanim.ShardAttack.Wave", self:GetCaster() )
for i=1,self.spiral_projectiles do
local Angle = QAngle( 0, self.flSpiralYaw, 0 )
local vVelocity = ( RotatePosition( Vector( 0, 0, 0 ), Angle, Vector( 1, 0, 0 ) ) ) * self.flCurSpeed
local nProjectileHandle = self:LaunchCrystals( vVelocity, 5000, self.spiral_projectile_width )
local ProjectileInfo = {}
ProjectileInfo.nHandle = nProjectileHandle
ProjectileInfo.flYaw = self.flSpiralYaw
ProjectileInfo.nFXIndex = ParticleManager:CreateParticle( "particles/creatures/aghanim/aghanim_shard_proj.vpcf", PATTACH_CUSTOMORIGIN, nil )
local vLoc = self:GetCaster():GetAbsOrigin()
vLoc.z = GetGroundHeight( vLoc, self:GetCaster() ) + 50
ProjectileInfo.attachEnt = CreateUnitByName( "npc_dota_wisp_spirit", vLoc, false, self:GetCaster(), self:GetCaster(), DOTA_TEAM_GOODGUYS )
if ProjectileInfo.attachEnt ~= nil then
ProjectileInfo.attachEnt:AddNewModifier( self:GetCaster(), self, "modifier_wisp_spirit_invulnerable", {} )
end
ParticleManager:SetParticleControlEnt( ProjectileInfo.nFXIndex, 0, ProjectileInfo.attachEnt, PATTACH_ABSORIGIN_FOLLOW, nil, vLoc, false )
ParticleManager:SetParticleControl( ProjectileInfo.nFXIndex, 1, Vector( self.spiral_projectile_width, self.spiral_projectile_width, self.spiral_projectile_width ) )
ParticleManager:SetParticleControl( ProjectileInfo.nFXIndex, 2, Vector( 6, 6, 6 ) )
--local flSpeedColorFactor = self.flCurSpeed / self.spiral_projectile_speed
--local vColor = LerpVectors( SLOW_COLOR, FAST_COLOR, flSpeedColorFactor )
--ParticleManager:SetParticleControl( ProjectileInfo.nFXIndex, 15, vColor )
table.insert( self.Projectiles, ProjectileInfo )
if self.bReverse then
self.flSpiralYaw = self.flSpiralYaw - self.flSpiralYawStep
else
self.flSpiralYaw = self.flSpiralYaw + self.flSpiralYawStep
end
end
self.flSpiralYaw = self.flSpiralYaw + self.flSpiralYawStep * 0.5
end
-------------------------------------------------------------------------------
function aghanim_shard_attack:ThinkSpiralProjectile( info )
if self:IsChanneling() then
local flNewYaw = 0
if self.bReverse then
flNewYaw = info.flYaw - self.spiral_projectile_rotation_speed
else
flNewYaw = info.flYaw + self.spiral_projectile_rotation_speed
end
info.flYaw = flNewYaw
local Angle = QAngle( 0, flNewYaw, 0 )
local vNewVelocity = ( RotatePosition( Vector( 0, 0, 0 ), Angle, Vector( 1, 0, 0 ) ) ) * self.flCurSpeed
ProjectileManager:UpdateLinearProjectileDirection( info.nHandle, vNewVelocity, 5000 )
end
local vLoc = ProjectileManager:GetLinearProjectileLocation( info.nHandle )
vLoc.z = GetGroundHeight( vLoc, self:GetCaster() ) + 50
info.attachEnt:SetAbsOrigin( vLoc )
--ParticleManager:SetParticleControl( info.nFXIndex, 0, vLoc )
--local flSpeedColorFactor = self.flCurSpeed / self.spiral_projectile_speed
--local vColor = LerpVectors( SLOW_COLOR, FAST_COLOR, flSpeedColorFactor )
--ParticleManager:SetParticleControl( info.nFXIndex, 15, vColor )
--rint( "setting new velocity on spiral projectile" )
end
-------------------------------------------------------------------------------
function aghanim_shard_attack:BeginRebound()
end
-------------------------------------------------------------------------------
function aghanim_shard_attack:ThinkRebound( flInterval )
end
-------------------------------------------------------------------------------
function aghanim_shard_attack:ThinkReboundProjectile( info )
end
-------------------------------------------------------------------------------
function aghanim_shard_attack:BeginJitter()
end
-------------------------------------------------------------------------------
function aghanim_shard_attack:ThinkJitter( flInterval )
end
-------------------------------------------------------------------------------
function aghanim_shard_attack:ThinkJitterProjectile( info )
end
--------------------------------------------------------------------------------
function aghanim_shard_attack:LaunchCrystals( vVel, flDist, flRadius )
local info =
{
Ability = self,
vSpawnOrigin = self:GetCaster():GetAbsOrigin(),
fStartRadius = flRadius,
fEndRadius = flRadius,
vVelocity = vVel,
fDistance = flDist,
Source = self:GetCaster(),
iUnitTargetTeam = DOTA_UNIT_TARGET_TEAM_ENEMY,
iUnitTargetType = DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC,
fExpireTime = GameRules:GetGameTime() + 10.0,
}
return ProjectileManager:CreateLinearProjectile( info )
end
-------------------------------------------------------------------------------
function aghanim_shard_attack:OnProjectileThinkHandle( iProjectileHandle )
if IsServer() then
local info = nil
for _,v in pairs ( self.Projectiles ) do
if v.nHandle == iProjectileHandle then
info = v
break
end
end
if info == nil then
return
end
if self.nPattern == PATTERN_SPIRAL then
self:ThinkSpiralProjectile( info )
end
end
end
-------------------------------------------------------------------------------
function aghanim_shard_attack:OnProjectileHitHandle( hTarget, vLocation, iProjectileHandle )
if IsServer() then
local info = nil
for _,v in pairs ( self.Projectiles ) do
if v.nHandle == iProjectileHandle then
info = v
break
end
end
if info == nil then
return false
end
if self.nPattern == PATTERN_SPIRAL then
ParticleManager:DestroyParticle( info.nFXIndex, false )
UTIL_Remove( info.attachEnt )
info.attachEnt = nil
end
if hTarget and not hTarget:IsMagicImmune() and not hTarget:IsInvulnerable() then
local damage =
{
victim = hTarget,
attacker = self:GetCaster(),
damage = self.spiral_projectile_damage,
damage_type = DAMAGE_TYPE_PURE,
ability = self,
}
ApplyDamage( damage )
EmitSoundOn( "Hero_Silencer.LastWord.Damage", hTarget )
local nFXIndex = ParticleManager:CreateParticle( "particles/units/heroes/hero_lich/lich_frost_nova.vpcf", PATTACH_WORLDORIGIN, nil )
ParticleManager:SetParticleControl( nFXIndex, 0, hTarget:GetAbsOrigin() )
ParticleManager:SetParticleControl( nFXIndex, 1, Vector( self.spiral_projectile_width, self.spiral_projectile_width, self.spiral_projectile_width ) )
ParticleManager:ReleaseParticleIndex( nFXIndex )
end
end
return true
end

View File

@@ -1,146 +0,0 @@
aghanim_spell_swap = class({})
LinkLuaModifier( "modifier_aghanim_spell_swap", "modifiers/creatures/modifier_aghanim_spell_swap", LUA_MODIFIER_MOTION_NONE )
LinkLuaModifier( "modifier_aghanim_spell_swap_crystal", "modifiers/creatures/modifier_aghanim_spell_swap_crystal", LUA_MODIFIER_MOTION_BOTH )
----------------------------------------------------------------------------------------
function aghanim_spell_swap:Precache( context )
PrecacheResource( "particle", "particles/creatures/aghanim/aghanim_beam_channel.vpcf", context )
PrecacheResource( "particle", "particles/creatures/aghanim/aghanim_spell_swap_beam.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_wisp/wisp_tether_hit.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_wisp/wisp_guardian_explosion.vpcf", context )
PrecacheResource( "particle", "particles/creatures/aghanim/aghanim_crystal_spellswap_replenish.vpcf", context )
PrecacheResource( "particle", "particles/creatures/aghanim/aghanim_crystal_spellswap_ambient.vpcf", context )
PrecacheResource( "particle", "particles/creatures/aghanim/aghanim_crystal_destroy.vpcf", context )
PrecacheResource( "particle", "particles/creatures/aghanim/aghanim_crystal_impact.vpcf", context )
PrecacheResource( "soundfile", "soundevents/game_sounds_heroes/game_sounds_warlock.vsndevts", context )
PrecacheResource( "soundfile", "soundevents/game_sounds_heroes/game_sounds_pugna.vsndevts", context )
PrecacheResource( "soundfile", "soundevents/game_sounds_heroes/game_sounds_wisp.vsndevts", context )
PrecacheResource( "model", "models/gameplay/aghanim_crystal.vmdl", context )
end
--------------------------------------------------------------------------------
function aghanim_spell_swap:ProcsMagicStick()
return false
end
--------------------------------------------------------------------------------
function aghanim_spell_swap:OnAbilityPhaseStart()
if IsServer() then
self.nChannelFX = ParticleManager:CreateParticle( "particles/creatures/aghanim/aghanim_beam_channel.vpcf", PATTACH_ABSORIGIN_FOLLOW, self:GetCaster() )
end
return true
end
-------------------------------------------------------------------------------
function aghanim_spell_swap:GetChannelTime()
if IsServer() then
local flChannelTime = self.BaseClass.GetChannelTime( self )
local nHealthPct = self:GetCaster():GetHealthPercent()
if nHealthPct < 50 then
flChannelTime = flChannelTime - 1.0
end
if nHealthPct < 25 then
flChannelTime = flChannelTime - 1.0
end
return flChannelTime
end
return self.BaseClass.GetChannelTime( self )
end
-------------------------------------------------------------------------------
function aghanim_spell_swap:OnChannelThink( flInterval )
if IsServer() then
end
end
-------------------------------------------------------------------------------
function aghanim_spell_swap:OnChannelFinish( bInterrupted )
if IsServer() then
ParticleManager:DestroyParticle( self.nChannelFX, false )
for _,nFXIndex in pairs ( self.nBeamFXIndices ) do
ParticleManager:DestroyParticle( nFXIndex, true )
end
StopSoundOn( "Hero_Pugna.LifeDrain.Loop", self:GetCaster() )
for k,hHero in pairs ( self.Heroes ) do
if hHero ~= nil and hHero:IsRealHero() then
hHero:RemoveModifierByName( "modifier_arc_warden_spark_wraith_purge" )
hHero:AddNewModifier( self:GetCaster(), self, "modifier_aghanim_spell_swap", {} )
end
end
end
end
--------------------------------------------------------------------------------
function aghanim_spell_swap:OnSpellStart()
if IsServer() then
self.nBeamFXIndices = {}
local hSummonPortals = self:GetCaster():FindAbilityByName( "aghanim_summon_portals" )
if hSummonPortals then
local kv =
{
duration = self:GetChannelTime(),
mode = hSummonPortals.PORTAL_MODE_ALL_ENEMIES,
depth = 0,
target_entindex = -1,
}
local vRightPos = self:GetCaster():GetAbsOrigin() + self:GetCaster():GetRightVector() * 300
local vLeftPos = self:GetCaster():GetAbsOrigin() - self:GetCaster():GetRightVector() * 300
CreateModifierThinker( self:GetCaster(), self, "modifier_aghanim_summon_portals_thinker", kv, vRightPos, self:GetCaster():GetTeamNumber(), false )
CreateModifierThinker( self:GetCaster(), self, "modifier_aghanim_summon_portals_thinker", kv, vLeftPos, self:GetCaster():GetTeamNumber(), false )
end
EmitSoundOn( "Hero_Pugna.LifeDrain.Cast", self:GetCaster() )
EmitSoundOn( "Hero_Pugna.LifeDrain.Loop", self:GetCaster() )
self.Heroes = FindUnitsInRadius( self:GetCaster():GetTeamNumber(), self:GetCaster():GetAbsOrigin(), nil, 5000, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_HERO, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES + DOTA_UNIT_TARGET_FLAG_INVULNERABLE, FIND_CLOSEST, false )
for k,hHero in pairs ( self.Heroes ) do
if hHero ~= nil and hHero:IsRealHero() then
local nNumAghDummies = 0
for j=1,4 do
local szName = tostring( "aghanim_empty_spell" .. j )
local hDummyAbility = hHero:FindAbilityByName( szName )
if hDummyAbility then
nNumAghDummies = nNumAghDummies + 1
end
end
if nNumAghDummies == 4 then
print( "I have 4 agh dummies! Getting slowed." )
hHero:AddNewModifier( self:GetCaster(), self, "modifier_arc_warden_spark_wraith_purge", { duration = self:GetChannelTime() } )
end
local nBeamFX = ParticleManager:CreateParticle( "particles/creatures/aghanim/aghanim_spell_swap_beam.vpcf", PATTACH_CUSTOMORIGIN, self:GetCaster() )
local szAttachment = "attach_hand_R"
if RandomInt( 0, 1 ) == 1 then
szAttachment = "attach_lower_hand_R"
end
ParticleManager:SetParticleControlEnt( nBeamFX, 0, self:GetCaster(), PATTACH_POINT_FOLLOW, szAttachment, self:GetCaster():GetAbsOrigin(), true )
ParticleManager:SetParticleControlEnt( nBeamFX, 1, hHero, PATTACH_POINT_FOLLOW, "attach_hitloc", hHero:GetAbsOrigin(), true )
ParticleManager:SetParticleControl( nBeamFX, 11, Vector( 1, 0, 0 ) )
table.insert( self.nBeamFXIndices, nBeamFX )
end
end
end
end
--------------------------------------------------------------------------------

View File

@@ -1,147 +0,0 @@
aghanim_staff_beams = class({})
LinkLuaModifier( "modifier_aghanim_staff_beams_thinker", "modifiers/creatures/modifier_aghanim_staff_beams_thinker", LUA_MODIFIER_MOTION_NONE )
LinkLuaModifier( "modifier_aghanim_staff_beams_linger_thinker", "modifiers/creatures/modifier_aghanim_staff_beams_linger_thinker", LUA_MODIFIER_MOTION_NONE )
LinkLuaModifier( "modifier_aghanim_staff_beams_debuff", "modifiers/creatures/modifier_aghanim_staff_beams_debuff", LUA_MODIFIER_MOTION_NONE )
----------------------------------------------------------------------------------------
function aghanim_staff_beams:Precache( context )
PrecacheResource( "particle", "particles/creatures/aghanim/staff_beam.vpcf", context )
PrecacheResource( "particle", "particles/creatures/aghanim/aghanim_beam_channel.vpcf", context )
PrecacheResource( "particle", "particles/creatures/aghanim/aghanim_beam_burn.vpcf", context )
PrecacheResource( "particle", "particles/creatures/aghanim/staff_beam_linger.vpcf", context )
PrecacheResource( "particle", "particles/creatures/aghanim/staff_beam_tgt_ring.vpcf", context )
PrecacheResource( "particle", "particles/creatures/aghanim/aghanim_debug_ring.vpcf", context )
PrecacheResource( "soundfile", "soundevents/game_sounds_heroes/game_sounds_phoenix.vsndevts", context )
PrecacheResource( "soundfile", "soundevents/game_sounds_heroes/game_sounds_huskar.vsndevts", context )
PrecacheResource( "soundfile", "soundevents/game_sounds_heroes/game_sounds_jakiro.vsndevts", context )
end
--------------------------------------------------------------------------------
function aghanim_staff_beams:ProcsMagicStick()
return false
end
--------------------------------------------------------------------------------
function aghanim_staff_beams:OnAbilityPhaseStart()
if IsServer() then
StartSoundEventFromPositionReliable( "Aghanim.StaffBeams.WindUp", self:GetCaster():GetAbsOrigin() )
self.nChannelFX = ParticleManager:CreateParticle( "particles/creatures/aghanim/aghanim_beam_channel.vpcf", PATTACH_ABSORIGIN_FOLLOW, self:GetCaster() )
self.vecTargets = FindUnitsInRadius( self:GetCaster():GetTeamNumber(), self:GetCaster():GetAbsOrigin(), nil, 5000, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_HERO, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES + DOTA_UNIT_TARGET_FLAG_INVULNERABLE, FIND_CLOSEST, false )
for k,enemy in pairs ( self.vecTargets ) do
if enemy ~= nil then
enemy.nWarningFXIndex = ParticleManager:CreateParticle( "particles/creatures/aghanim/aghanim_debug_ring.vpcf", PATTACH_CUSTOMORIGIN, self:GetCaster() )
ParticleManager:SetParticleControl( enemy.nWarningFXIndex, 0, enemy:GetAbsOrigin() )
enemy.vSourceLoc = enemy:GetAbsOrigin()
end
end
end
return true
end
--------------------------------------------------------------------------------
function aghanim_staff_beams:OnSpellStart()
if IsServer() then
--EmitSoundOn( "Aghanim.ShardAttack.Channel", self:GetCaster() )
EmitSoundOn( "Hero_Phoenix.SunRay.Cast", self:GetCaster() )
EmitSoundOn( "Hero_Phoenix.SunRay.Loop", self:GetCaster() )
self.Projectiles = {}
for k,enemy in pairs ( self.vecTargets ) do
if enemy ~= nil then
local hBeamThinker = CreateModifierThinker( self:GetCaster(), self, "modifier_aghanim_staff_beams_thinker", { duration = self:GetChannelTime() }, enemy.vSourceLoc, self:GetCaster():GetTeamNumber(), false )
ParticleManager:DestroyParticle( enemy.nWarningFXIndex, false )
local projectile =
{
Target = enemy,
Source = hBeamThinker,
Ability = self,
EffectName = "",
iMoveSpeed = self:GetSpecialValueFor( "beam_speed" ),
vSourceLoc = enemy.vSourceLoc,
bDodgeable = false,
bProvidesVision = false,
flExpireTime = GameRules:GetGameTime() + self:GetChannelTime(),
bIgnoreObstructions = true,
bSuppressTargetCheck = true,
}
projectile.hThinker = hBeamThinker
local nProjectileHandle = ProjectileManager:CreateTrackingProjectile( projectile )
projectile.nProjectileHandle = nProjectileHandle
local nBeamFXIndex = ParticleManager:CreateParticle( "particles/creatures/aghanim/staff_beam.vpcf", PATTACH_CUSTOMORIGIN, self:GetCaster() )
ParticleManager:SetParticleControlEnt( nBeamFXIndex, 0, self:GetCaster(), PATTACH_POINT_FOLLOW, "attach_staff_fx", self:GetCaster():GetAbsOrigin(), true )
ParticleManager:SetParticleControlEnt( nBeamFXIndex, 1, projectile.hThinker, PATTACH_ABSORIGIN_FOLLOW, nil, projectile.hThinker:GetOrigin(), true )
ParticleManager:SetParticleControlEnt( nBeamFXIndex, 2, self:GetCaster(), PATTACH_ABSORIGIN_FOLLOW, nil, projectile.hThinker:GetOrigin(), true )
ParticleManager:SetParticleControlEnt( nBeamFXIndex, 9, self:GetCaster(), PATTACH_POINT_FOLLOW, "attach_hitloc", self:GetCaster():GetAbsOrigin(), true )
projectile.nFXIndex = nBeamFXIndex
table.insert( self.Projectiles, projectile )
end
end
--self:GetCaster():AddNewModifier( self:GetCaster(), self, "modifier_aghanim_staff_beams", kv )
end
end
-------------------------------------------------------------------------------
function aghanim_staff_beams:OnProjectileThinkHandle( nProjectileHandle )
if IsServer() then
local Projectile = nil
for k,v in pairs( self.Projectiles ) do
if v.nProjectileHandle == nProjectileHandle then
Projectile = v
break
end
end
if Projectile == nil then
return
end
local vLocation = ProjectileManager:GetTrackingProjectileLocation( nProjectileHandle )
if Projectile.hThinker ~= nil and not Projectile.hThinker:IsNull() then
vLocation = GetGroundPosition( vLocation, Projectile.hThinker )
Projectile.hThinker:SetOrigin( vLocation )
ParticleManager:SetParticleControlFallback( Projectile.nFXIndex, 0, self:GetCaster():GetAbsOrigin() )
ParticleManager:SetParticleControlFallback( Projectile.nFXIndex, 1, vLocation )
ParticleManager:SetParticleControlFallback( Projectile.nFXIndex, 9, self:GetCaster():GetAbsOrigin() )
end
end
end
-------------------------------------------------------------------------------
function aghanim_staff_beams:OnChannelThink( flInterval )
if IsServer() then
end
end
-------------------------------------------------------------------------------
function aghanim_staff_beams:OnChannelFinish( bInterrupted )
if IsServer() then
ParticleManager:DestroyParticle( self.nChannelFX, false )
StopSoundOn( "Hero_Phoenix.SunRay.Cast", self:GetCaster() )
StopSoundOn( "Hero_Phoenix.SunRay.Loop", self:GetCaster() )
EmitSoundOn( "Hero_Phoenix.SunRay.Stop", self:GetCaster() )
for _,v in pairs ( self.Projectiles ) do
ParticleManager:DestroyParticle( v.nFXIndex, false )
if v.hThinker and v.hThinker:IsNull() == false then
UTIL_Remove( v.hThinker )
end
end
--self:GetCaster():RemoveModifierByName( "modifier_aghanim_staff_beams" )
end
end

View File

@@ -1,315 +0,0 @@
aghanim_summon_portals = class( {} )
LinkLuaModifier( "modifier_aghanim_portal_spawn_effect", "modifiers/creatures/modifier_aghanim_portal_spawn_effect", LUA_MODIFIER_MOTION_NONE )
LinkLuaModifier( "modifier_aghanim_summon_portals_thinker", "modifiers/creatures/modifier_aghanim_summon_portals_thinker", LUA_MODIFIER_MOTION_NONE )
----------------------------------------------------------------------------------------
function aghanim_summon_portals:Precache( context )
PrecacheResource( "particle", "particles/econ/events/ti10/portal/portal_open_bad.vpcf", context )
PrecacheResource( "particle", "particles/creatures/aghanim/portal_summon.vpcf", context )
PrecacheResource( "particle", "particles/creatures/aghanim/aghanim_portal_summon.vpcf", context )
PrecacheResource( "particle", "particles/creatures/aghanim/aghanim_portal_emit.vpcf", context )
PrecacheResource( "particle", "particles/econ/events/ti10/portal/portal_emit_large.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_pugna/pugna_decrepify.vpcf", context )
PrecacheResource( "particle", "particles/status_fx/status_effect_ghost.vpcf", context )
PrecacheResource( "particle", "particles/creatures/aghanim/aghanim_stomp_magical.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_elder_titan/elder_titan_echo_stomp_impact_magical.vpcf", context )
PrecacheResource( "soundfile", "soundevents/game_sounds_heroes/game_sounds_elder_titan.vsndevts", context )
PrecacheUnitByNameSync( "npc_dota_creature_aghanim_minion", context, -1 )
PrecacheUnitByNameSync( "npc_dota_boss_aghanim_spear", context, -1 )
self.PORTAL_MODE_ALL_SPEARS = 0
self.PORTAL_MODE_ALL_ENEMIES = 1
self.PORTAL_MODE_BOTH = 2
self.nLastPortalMode = self.PORTAL_MODE_ALL_ENEMIES
self.nMode = 0
self.nDepthRemaining = 20
self.nPortals = 0
self.nNumPortalsThisCast = 0
self.flPortalSummmonTime = self:GetSpecialValueFor( "portal_time" )
self.flStartGestureTime = 999999999999
self.bSynchedPortalRelease = false
end
--------------------------------------------------------------------------------
function aghanim_summon_portals:ProcsMagicStick()
return false
end
--------------------------------------------------------------------------------
function aghanim_summon_portals:OnAbilityPhaseStart()
if IsServer() then
self.nPortals = self:GetPortalCount()
self.flPortalSummmonTime = self:GetSpecialValueFor( "portal_time" )
self.nChannelFX = ParticleManager:CreateParticle( "particles/creatures/aghanim/aghanim_portal_summon.vpcf", PATTACH_ABSORIGIN_FOLLOW, self:GetCaster() )
EmitSoundOn( "Hero_ElderTitan.EchoStomp.Channel", self:GetCaster() )
self.staff_crush_radius = self:GetSpecialValueFor( "staff_crush_radius" )
self.staff_crush_damage = self:GetSpecialValueFor( "staff_crush_damage" )
self.staff_crush_stun_duration = self:GetSpecialValueFor( "staff_crush_stun_duration" )
self.staff_crush_delay = self:GetSpecialValueFor( "staff_crush_delay" )
local vToTarget = self:GetCursorPosition() - self:GetCaster():GetAbsOrigin()
vToTarget.z = 0
vToTarget = vToTarget:Normalized()
self.vStaffEndPos = self:GetCaster():GetAbsOrigin() + ( vToTarget * 200.0 )--+ ( self:GetCaster():GetRightVector() * -30 )
self.vStaffEndPos = GetGroundPosition( self.vStaffEndPos, self:GetCaster() )
local nFXIndex = ParticleManager:CreateParticle( "particles/creatures/aghanim/aghanim_crystal_attack_telegraph.vpcf", PATTACH_CUSTOMORIGIN, nil )
ParticleManager:SetParticleControl( nFXIndex, 0, self.vStaffEndPos )
ParticleManager:SetParticleControl( nFXIndex, 1, Vector( self.staff_crush_radius, 1.6, 1.6 ) )
ParticleManager:SetParticleControl( nFXIndex, 15, Vector( 255, 0, 0 ) )
ParticleManager:SetParticleControl( nFXIndex, 16, Vector( 1, 0, 0 ) )
ParticleManager:ReleaseParticleIndex( nFXIndex )
end
return true
end
-------------------------------------------------------------------------------
function aghanim_summon_portals:OnChannelThink( flInterval )
if IsServer() then
if self.nPortals > 0 and GameRules:GetGameTime() > self.flNextPortalTime then
self.flNextPortalTime = GameRules:GetGameTime() + self.flPortalInterval
if self.nNumPortalsInLine > 0 then
self:CreateNextPortalAlongLine()
self.nNumPortalsInLine = self.nNumPortalsInLine - 1
self.nNumPortalsThisCast = self.nNumPortalsThisCast + 1
end
if self.nNumPortalsNearHeroes > 0 then
self:CreateNearHeroPortal()
self.nNumPortalsNearHeroes = self.nNumPortalsNearHeroes - 1
self.nNumPortalsThisCast = self.nNumPortalsThisCast + 1
end
end
if self.bHasStaffCrushed == false then
self.staff_crush_delay = self.staff_crush_delay - flInterval
if self.staff_crush_delay < 0 then
self.bHasStaffCrushed = true
self:StaffCrush()
end
end
if GameRules:GetGameTime() > self.flStartGestureTime then
self:GetCaster():StartGesture( ACT_DOTA_IDLE )
self.flStartGestureTime = 9999999999999
end
end
end
-------------------------------------------------------------------------------
function aghanim_summon_portals:OnChannelFinish( bInterrupted )
if IsServer() then
ParticleManager:DestroyParticle( self.nChannelFX, false )
self:GetCaster():RemoveGesture( ACT_DOTA_IDLE )
end
end
-------------------------------------------------------------------------------
function aghanim_summon_portals:OnSpellStart()
if IsServer() then
self.flStartGestureTime = GameRules:GetGameTime() + 2.5
self.bHasStaffCrushed = false
self.flPortalInterval = self:GetChannelTime() / self.nPortals
self.flNextPortalTime = -1
self.nDepthRemaining = self:GetSpecialValueFor( "total_portal_depth" )
self.nLastPortalMode = self.nMode
self.nMode = self:GetPortalMode()
self.nNumPortalsThisCast = 0
self.nNumPortalsInLine = self:GetSpecialValueFor( "base_portals" )
self.nNumPortalsNearHeroes = self.nPortals - self.nNumPortalsInLine
if self.nMode == self.PORTAL_MODE_ALL_SPEARS then
local vMidPoint = nil
local vLineDir = nil
self.Heroes = FindUnitsInRadius( self:GetCaster():GetTeamNumber(), self:GetCaster():GetAbsOrigin(), nil, 5000, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_HERO, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES + DOTA_UNIT_TARGET_FLAG_INVULNERABLE, FIND_CLOSEST, false )
vMidPoint = self:GetCaster():GetAbsOrigin() + self:GetCaster():GetForwardVector() * 500
vLineDir = self:GetCaster():GetRightVector()
vLineDir.z = 0.0
vLineDir = vLineDir:Normalized()
local nPortalsRemaining = self.nNumPortalsInLine - 1
local flLineStep = 450
local flTotalLineDist = flLineStep * self.nNumPortalsInLine
local vFirstPortalPos = vMidPoint - ( vLineDir * ( flLineStep * nPortalsRemaining / 2 ) )
self.SpearLinePositions = {}
table.insert( self.SpearLinePositions, vFirstPortalPos )
for i=1,nPortalsRemaining do
local vNewPortalPos = vFirstPortalPos + ( vLineDir * i * flLineStep )
table.insert( self.SpearLinePositions, vNewPortalPos )
end
end
end
end
-------------------------------------------------------------------------------
function aghanim_summon_portals:StaffCrush()
if IsServer() then
local nFXCastIndex = ParticleManager:CreateParticle( "particles/creatures/aghanim/aghanim_stomp_magical.vpcf", PATTACH_WORLDORIGIN, self:GetCaster() )
ParticleManager:SetParticleControl( nFXCastIndex, 0, self.vStaffEndPos )
ParticleManager:SetParticleControl( nFXCastIndex, 1, Vector( self.radius, self.radius, self.radius ) )
ParticleManager:ReleaseParticleIndex( nFXCastIndex )
EmitSoundOn( "Hero_ElderTitan.EchoStomp", self:GetCaster() )
local enemies = FindUnitsInRadius( self:GetCaster():GetTeamNumber(), self.vStaffEndPos, self:GetCaster(), self.staff_crush_radius, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES, 0, false )
for _,enemy in pairs( enemies ) do
if enemy ~= nil and enemy:IsInvulnerable() == false then
local damageInfo =
{
victim = enemy,
attacker = self:GetCaster(),
damage = self.staff_crush_damage,
damage_type = DAMAGE_TYPE_PHYSICAL,
ability = self,
}
ApplyDamage( damageInfo )
enemy:AddNewModifier( self:GetCaster(), self, "modifier_stunned", { duration = self.staff_crush_stun_duration } )
local nFXIndex = ParticleManager:CreateParticle( "particles/units/heroes/hero_elder_titan/elder_titan_echo_stomp_impact_magical.vpcf", PATTACH_ABSORIGIN_FOLLOW, enemy )
local vDirection = enemy:GetOrigin() - self.vStaffEndPos
vDirection.z = 0.0
vDirection = vDirection:Normalized()
ParticleManager:SetParticleControl( nFXIndex, 1, enemy:GetOrigin() )
ParticleManager:SetParticleControlForward( nFXIndex, 1, vDirection )
ParticleManager:ReleaseParticleIndex( nFXIndex )
end
end
end
end
-------------------------------------------------------------------------------
function aghanim_summon_portals:GetPortalCount()
if IsServer() then
local nBasePortals = self:GetSpecialValueFor( "base_portals" )
local nHealthPctPerPortal = self:GetSpecialValueFor( "portal_health_pct" )
local nAdditionalPortals = math.floor( ( 100 - self:GetCaster():GetHealthPercent() ) / nHealthPctPerPortal )
return nBasePortals + nAdditionalPortals
end
return 0
end
-------------------------------------------------------------------------------
function aghanim_summon_portals:GetPortalMode()
if IsServer() then
return self.PORTAL_MODE_ALL_SPEARS
end
return 0
end
-------------------------------------------------------------------------------
function aghanim_summon_portals:CreateNearHeroPortal()
if IsServer() then
local nCountLeft = self.nNumPortalsNearHeroes
if nCountLeft <= 0 then
return
end
local Heroes = FindUnitsInRadius( self:GetCaster():GetTeamNumber(), self:GetCaster():GetAbsOrigin(), nil, 5000, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_HERO, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES + DOTA_UNIT_TARGET_FLAG_INVULNERABLE, FIND_CLOSEST, false )
if #Heroes == 0 then
return
end
local hTarget = Heroes[ RandomInt( 1, #Heroes ) ]
if hTarget == nil then
return
end
local vToAghanim = self:GetCaster():GetAbsOrigin() - hTarget:GetAbsOrigin()
vToAghanim.z = 0.0
vToAghanim = vToAghanim:Normalized()
local vPos = hTarget:GetAbsOrigin() - vToAghanim * RandomFloat( self:GetSpecialValueFor( "min_portal_offset" ), self:GetSpecialValueFor( "max_portal_offset" ) )
if GridNav:CanFindPath( hTarget:GetAbsOrigin(), vPos ) == false then
return
end
local flDuration = 0.5 + ( self:GetChannelStartTime() + self:GetChannelTime() ) - GameRules:GetGameTime() - ( nCountLeft * 0.3 )
local kv =
{
duration = flDuration,
mode = self.PORTAL_MODE_ALL_SPEARS,
depth = 0,
target_entindex = hTarget:entindex(),
}
CreateModifierThinker( self:GetCaster(), self, "modifier_aghanim_summon_portals_thinker", kv, vPos, self:GetCaster():GetTeamNumber(), false )
end
end
-------------------------------------------------------------------------------
function aghanim_summon_portals:CreateNextPortalAlongLine()
if IsServer() then
local nCountLeft = #self.SpearLinePositions
if nCountLeft == 0 then
return
end
local vPos = self.SpearLinePositions[ 1 ]
local hTarget = nil
if #self.Heroes == 0 then
local Heroes = FindUnitsInRadius( self:GetCaster():GetTeamNumber(), self:GetCaster():GetAbsOrigin(), nil, 5000, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_HERO, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES + DOTA_UNIT_TARGET_FLAG_INVULNERABLE, FIND_CLOSEST, false )
if #Heroes == 0 then
return
end
hTarget = Heroes[ RandomInt( 1, #Heroes ) ]
else
local nIndex = RandomInt( 1, #self.Heroes )
hTarget = self.Heroes[ nIndex ]
table.remove( self.Heroes, nIndex )
end
if hTarget == nil then
return
end
local flDuration = 0.5 + ( self:GetChannelStartTime() + self:GetChannelTime() ) - GameRules:GetGameTime() - ( nCountLeft * 0.3 )
table.remove( self.SpearLinePositions, 1 )
local kv =
{
duration = flDuration,
mode = self.PORTAL_MODE_ALL_SPEARS,
depth = 0,
target_entindex = hTarget:entindex(),
}
CreateModifierThinker( self:GetCaster(), self, "modifier_aghanim_summon_portals_thinker", kv, vPos, self:GetCaster():GetTeamNumber(), false )
end
end
-------------------------------------------------------------------------------

View File

@@ -1,37 +0,0 @@
aghsfort_brewmaster_primal_split = class({})
LinkLuaModifier( "modifier_brewmaster_split", "modifiers/creatures/modifier_brewmaster_split", LUA_MODIFIER_MOTION_NONE )
----------------------------------------------------------------------------------------
function aghsfort_brewmaster_primal_split:Precache( context )
PrecacheResource( "particle", "particles/units/heroes/hero_brewmaster/brewmaster_primal_split.vpcf", context )
PrecacheUnitByNameSync( "npc_dota_brewmaster_earth_unit", context, -1 )
PrecacheUnitByNameSync( "npc_dota_brewmaster_storm_unit", context, -1 )
PrecacheUnitByNameSync( "npc_dota_brewmaster_fire_unit", context, -1 )
end
--------------------------------------------------------------------------------
function aghsfort_brewmaster_primal_split:OnAbilityPhaseStart()
if IsServer() then
local hLines = { "Hero_Brewmaster.PrimalSplit.VO6", "Hero_Brewmaster.PrimalSplit.VO7", "Hero_Brewmaster.PrimalSplit.VO8", }
local nRandomInt = RandomInt(1,3)
local hSplitLine = hLines[nRandomInt]
EmitSoundOn( hSplitLine, self:GetCaster() )
end
return true
end
--------------------------------------------------------------------------------
function aghsfort_brewmaster_primal_split:OnSpellStart()
if IsServer() == false then
return
end
EmitSoundOn( "Hero_Brewmaster.PrimalSplit.Cast", self:GetCaster() )
self:GetCaster():AddNewModifier( self:GetCaster(), self, "modifier_brewmaster_split", { duration = self:GetSpecialValueFor( "split_duration" ) } )
end
--------------------------------------------------------------------------------

View File

@@ -1,76 +0,0 @@
aghsfort_brewmaster_thunderclap = class({})
----------------------------------------------------------------------------------------
function aghsfort_brewmaster_thunderclap:Precache( context )
PrecacheResource( "particle", "particles/units/heroes/hero_brewmaster/brewmaster_thunder_clap.vpcf", context )
end
--------------------------------------------------------------------------------
function aghsfort_brewmaster_thunderclap:OnAbilityPhaseStart()
if IsServer() then
self.radius = self:GetSpecialValueFor( "radius" )
self.duration = self:GetSpecialValueFor( "duration" )
self.damage = self:GetSpecialValueFor( "damage" )
self.speed = self:GetSpecialValueFor( "speed" )
self.nPreviewFX = ParticleManager:CreateParticle( "particles/dark_moon/darkmoon_creep_warning.vpcf", PATTACH_ABSORIGIN_FOLLOW, self:GetCaster() )
ParticleManager:SetParticleControlEnt( self.nPreviewFX, 0, self:GetCaster(), PATTACH_ABSORIGIN_FOLLOW, nil, self:GetCaster():GetOrigin(), true )
ParticleManager:SetParticleControl( self.nPreviewFX, 1, Vector( radius, radius, radius ) )
ParticleManager:SetParticleControl( self.nPreviewFX, 15, Vector( 255, 26, 26 ) )
EmitSoundOn( "Hero_Brewmaster.ThunderClap.Target", self:GetCaster() )
end
return true
end
--------------------------------------------------------------------------------
function aghsfort_brewmaster_thunderclap:OnAbilityPhaseInterrupted()
if IsServer() then
ParticleManager:DestroyParticle( self.nPreviewFX, false )
end
end
--------------------------------------------------------------------------------
function aghsfort_brewmaster_thunderclap:GetPlaybackRateOverride()
return 0.5
end
--------------------------------------------------------------------------------
function aghsfort_brewmaster_thunderclap:OnSpellStart()
if IsServer() then
ParticleManager:DestroyParticle( self.nPreviewFX, false )
local nFXIndex = ParticleManager:CreateParticle( "particles/units/heroes/hero_brewmaster/brewmaster_thunder_clap.vpcf", PATTACH_ABSORIGIN, self:GetCaster() )
ParticleManager:SetParticleControl( nFXIndex, 1, Vector( self.radius, self.radius, self.radius ) )
ParticleManager:SetParticleControlEnt( nFXIndex, 2, self:GetCaster(), PATTACH_POINT_FOLLOW, "attach_attack1", self:GetCaster():GetOrigin(), true )
ParticleManager:ReleaseParticleIndex( nFXIndex )
EmitSoundOn( "Hero_Brewmaster.ThunderClap", self:GetCaster() )
local enemies = FindUnitsInRadius( self:GetCaster():GetTeamNumber(), self:GetCaster():GetOrigin(), nil, self.radius, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC + DOTA_UNIT_TARGET_BUILDING, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES, FIND_CLOSEST, false )
for _,enemy in pairs( enemies ) do
if enemy ~= nil and enemy:IsInvulnerable() == false then
local damageInfo =
{
victim = enemy,
attacker = self:GetCaster(),
damage = self.damage,
damage_type = DAMAGE_TYPE_MAGICAL,
ability = self,
}
ApplyDamage( damageInfo )
enemy:AddNewModifier( self:GetCaster(), self, "modifier_polar_furbolg_ursa_warrior_thunder_clap", { duration = self.duration } )
end
end
end
end
--------------------------------------------------------------------------------

View File

@@ -1,83 +0,0 @@
aghsfort_elemental_tiny_create_io = class({})
LinkLuaModifier( "modifier_elemental_tiny_create_io_dummy", "modifiers/creatures/modifier_elemental_tiny_create_io_dummy", LUA_MODIFIER_MOTION_NONE )
----------------------------------------------------------------------------------------
function aghsfort_elemental_tiny_create_io:Precache( context )
PrecacheUnitByNameSync( "npc_dota_creature_elemental_io", context, -1 )
end
--------------------------------------------------------------------------------
function aghsfort_elemental_tiny_create_io:ProcsMagicStick()
return false
end
--------------------------------------------------------------------------------
function aghsfort_elemental_tiny_create_io:OnSpellStart()
if not IsServer() then
return
end
if self:GetCaster() == nil or self:GetCaster():IsNull() then
return
end
local nSummonCount = self:GetSpecialValueFor( "spawn_count" )
local nMaxSummons = self:GetSpecialValueFor( "max_summons" )
local flSpawnDistance = self:GetSpecialValueFor( "spawn_distance" )
local flDeltaAngle = 360 / nSummonCount
local vAngles = QAngle( 0, math.random( 0, flDeltaAngle ), 0 )
--first time we spawn, create 2 the hIos
if not self:GetCaster():FindModifierByName( "modifier_elemental_tiny_create_io_dummy" ) then
nSummonCount = 2
local kv2 = {}
self:GetCaster():AddNewModifier( self:GetCaster(), self, "modifier_elemental_tiny_create_io_dummy", kv2 )
end
for i = 1,nSummonCount do
local vSpawnPosition = nil
for s = 1,36 do
local vDir = AnglesToVector( vAngles )
local vTest = self:GetCaster():GetAbsOrigin() + vDir * flSpawnDistance + math.random( -25, 25 )
if GameRules.Aghanim:GetCurrentRoom():IsValidSpawnPoint( vTest ) then
vSpawnPosition = vTest
break
end
vAngles.y = vAngles.y + 10
end
vAngles.y = vAngles.y + flDeltaAngle + math.random( -20, 20 )
if vSpawnPosition ~= nil then
local kv =
{
vLocX = vSpawnPosition.x,
vLocY = vSpawnPosition.y,
vLocZ = vSpawnPosition.z,
}
local hIo = CreateUnitByName( "npc_dota_creature_elemental_io", self:GetCaster():GetAbsOrigin(), true, self:GetCaster(), self:GetCaster(), self:GetCaster():GetTeamNumber() )
if hIo ~= nil then
hIo:AddNewModifier( self:GetCaster(), self, "modifier_frostivus2018_broodbaby_launch", kv )
hIo:SetOwner(self:GetCaster())
table.insert( self:GetCaster().hIos, hIo )
end
end
end
end
--------------------------------------------------------------------------------

View File

@@ -1,129 +0,0 @@
aghsfort_elemental_tiny_toss = class({})
LinkLuaModifier( "modifier_elemental_tiny_grab", "modifiers/creatures/modifier_elemental_tiny_grab", LUA_MODIFIER_MOTION_HORIZONTAL )
----------------------------------------------------------------------------------------
function aghsfort_elemental_tiny_toss:Precache( context )
PrecacheResource( "particle", "particles/dark_moon/darkmoon_creep_warning.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_tiny/tiny_toss_blur.vpcf", context )
PrecacheResource( "particle", "particles/creatures/aghanim/aghanim_crystal_attack_telegraph.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_wisp/wisp_tether.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_wisp/wisp_tether_hit.vpcf", context )
PrecacheResource( "particle", "particles/creatures/target_telegraph_attack.vpcf", context )
PrecacheResource( "particle", "particles/creatures/elemental_tiny_ping.vpcf", context )
end
--------------------------------------------------------------------------------
function aghsfort_elemental_tiny_toss:ProcsMagicStick()
return false
end
--------------------------------------------------------------------------------
function aghsfort_elemental_tiny_toss:OnAbilityPhaseStart()
if IsServer() then
self.nPreviewFX = ParticleManager:CreateParticle( "particles/dark_moon/darkmoon_creep_warning.vpcf", PATTACH_ABSORIGIN_FOLLOW, self:GetCaster() )
ParticleManager:SetParticleControlEnt( self.nPreviewFX, 0, self:GetCaster(), PATTACH_ABSORIGIN_FOLLOW, nil, self:GetCaster():GetOrigin(), true )
ParticleManager:SetParticleControl( self.nPreviewFX, 1, Vector( 50, 50, 50 ) )
ParticleManager:SetParticleControl( self.nPreviewFX, 15, Vector( 255, 0, 0 ) )
self.hProjectile = nil
-- We want to find an Io to toss
self:FindProjectile()
if self.hProjectile ~= nil then
return true
end
end
return false
end
--------------------------------------------------------------------------------
function aghsfort_elemental_tiny_toss:OnAbilityPhaseInterrupted()
if IsServer() then
-- We were interrupted. Drop our Io and stop our warnings
ParticleManager:DestroyParticle( self.nPreviewFX, false )
self.hProjectile:RemoveModifierByName( "modifier_elemental_tiny_grab" )
self.hProjectile = nil
end
end
--------------------------------------------------------------------------------
function aghsfort_elemental_tiny_toss:FindProjectile()
if IsServer() then
self.grab_radius = self:GetSpecialValueFor( "grab_radius" )
local entities = FindUnitsInRadius( self:GetCaster():GetTeamNumber(), self:GetCaster():GetOrigin(), self:GetCaster(), self.grab_radius, DOTA_UNIT_TARGET_TEAM_FRIENDLY, DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_CREEP, DOTA_UNIT_TARGET_FLAG_NO_INVIS + DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES + DOTA_UNIT_TARGET_FLAG_NOT_ANCIENTS, FIND_CLOSEST, false )
for _, hAlly in pairs( entities ) do
if hAlly ~= nil and not hAlly:IsNull() and hAlly:IsAlive() == true and hAlly:GetUnitName() == "npc_dota_creature_elemental_io" then
if not hAlly:FindModifierByName("modifier_tiny_toss") and not hAlly:FindModifierByName("modifier_elemental_tiny_grab") then
-- We found an Io, it's going to be our projectile
self.hProjectile = hAlly
end
end
end
if self.hProjectile ~= nil then
-- Position Io into our hand
self.hProjectile:AddNewModifier( self:GetCaster(), self, "modifier_elemental_tiny_grab", nil )
local nDestinationPreviewFX = ParticleManager:CreateParticle( "particles/creatures/elemental_tiny_ping.vpcf", PATTACH_CUSTOMORIGIN, nil )
--local nDestinationPreviewFX = ParticleManager:CreateParticle( "particles/ui_mouseactions/ping_retreat.vpcf", PATTACH_CUSTOMORIGIN, nil )
ParticleManager:SetParticleControl( nDestinationPreviewFX, 0, self:GetCaster():GetCursorPosition() )
--ParticleManager:SetParticleControl( nDestinationPreviewFX, 1, Vector( 275, 1.8, 1.8 ) )
ParticleManager:SetParticleControl( nDestinationPreviewFX, 7, Vector( 255, 10, 10 ) )
--ParticleManager:SetParticleControl( nDestinationPreviewFX, 16, Vector( 1, 0, 0 ) )
ParticleManager:ReleaseParticleIndex( nDestinationPreviewFX )
EmitSoundOnLocationWithCaster( self:GetCaster():GetCursorPosition(), "General.PingWarning", self:GetCaster() )
AddFOWViewer( DOTA_TEAM_GOODGUYS, self:GetCaster():GetCursorPosition(), self:GetSpecialValueFor( "radius" ), self:GetSpecialValueFor( "duration" ) + 0.5, false )
else
ParticleManager:DestroyParticle( self.nPreviewFX, false )
self:StartCooldown(2)
end
end
end
--------------------------------------------------------------------------------
function aghsfort_elemental_tiny_toss:OnSpellStart()
if IsServer() then
ParticleManager:DestroyParticle( self.nPreviewFX, false )
local vPos = nil
if self:GetCursorTarget() then
vPos = self:GetCursorTarget():GetOrigin()
else
vPos = self:GetCursorPosition()
end
local kv = {
x = vPos.x,
y = vPos.y,
z = vPos.z
}
if self.hProjectile ~= nil and self.hProjectile:IsAlive() then
-- Leave our hand, Io
self.hProjectile:RemoveModifierByName( "modifier_elemental_tiny_grab" )
-- And fly like the wind!
self.hProjectile:AddNewModifier( self:GetCaster(), self, "modifier_tiny_toss", kv )
self:GetCaster():StartGesture( ACT_TINY_TOSS )
EmitSoundOn( "Ability.TossThrow", self:GetCaster() )
end
end
end

View File

@@ -1,150 +0,0 @@
aghsfort_enraged_wildwing_tornado_blast = class({})
----------------------------------------------------------------------------------------
function aghsfort_enraged_wildwing_tornado_blast:Precache( context )
PrecacheResource( "particle", "particles/units/heroes/hero_invoker/invoker_tornado.vpcf", context )
PrecacheResource( "particle", "particles/creatures/wildwing_tornado_blast_debuff.vpcf", context )
PrecacheResource( "particle", "particles/dark_moon/darkmoon_creep_warning.vpcf", context )
end
--------------------------------------------------------------------------------
function aghsfort_enraged_wildwing_tornado_blast:OnAbilityPhaseStart()
if IsServer() then
self.nPreviewFX = ParticleManager:CreateParticle( "particles/dark_moon/darkmoon_creep_warning.vpcf", PATTACH_ABSORIGIN_FOLLOW, self:GetCaster() )
ParticleManager:SetParticleControlEnt( self.nPreviewFX, 0, self:GetCaster(), PATTACH_ABSORIGIN_FOLLOW, nil, self:GetCaster():GetOrigin(), true )
ParticleManager:SetParticleControl( self.nPreviewFX, 1, Vector( 175, 175, 175 ) )
ParticleManager:SetParticleControl( self.nPreviewFX, 15, Vector( 255, 140, 0 ) )
end
return true
end
--------------------------------------------------------------------------------
function aghsfort_enraged_wildwing_tornado_blast:OnAbilityPhaseInterrupted()
if IsServer() then
ParticleManager:DestroyParticle( self.nPreviewFX, false )
end
end
--------------------------------------------------------------------------------
function aghsfort_enraged_wildwing_tornado_blast:OnSpellStart()
if IsServer() then
ParticleManager:DestroyParticle( self.nPreviewFX, false )
local vDirection = self:GetCursorPosition() - self:GetCaster():GetOrigin()
vDirection.z = 0.0
vDirection = vDirection:Normalized()
self.travel_speed = self:GetSpecialValueFor( "travel_speed" )
self.area_of_effect = self:GetSpecialValueFor( "area_of_effect" )
self.damage = self:GetSpecialValueFor( "damage" )
self.disable_duration = self:GetSpecialValueFor( "disable_duration" )
self.travel_distance = self:GetSpecialValueFor( "travel_distance" )
self.spawns_per_blast = self:GetSpecialValueFor( "spawns_per_blast" )
self.harpy_spawn_amount = self:GetSpecialValueFor( "harpy_spawn_amount" )
self.spawn_interval = (self.travel_distance / self.travel_speed) / self.harpy_spawn_amount - 0.1
local info = {
EffectName = "particles/units/heroes/hero_invoker/invoker_tornado.vpcf",
Ability = self,
vSpawnOrigin = self:GetCaster():GetOrigin(),
fStartRadius = self.area_of_effect,
fEndRadius = self.area_of_effect,
vVelocity = vDirection * self.travel_speed,
fDistance = self.travel_distance,
Source = self:GetCaster(),
iUnitTargetTeam = DOTA_UNIT_TARGET_TEAM_ENEMY,
iUnitTargetType = DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_CREEP,
iUnitTargetFlags = DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES
}
self.flLastThinkTime = GameRules:GetGameTime()
self.nProjID = ProjectileManager:CreateLinearProjectile( info )
EmitSoundOn( "Ability.TornadoBlast.Cast" , self:GetCaster() )
end
end
--------------------------------------------------------------------------------
function aghsfort_enraged_wildwing_tornado_blast:OnProjectileThink( vLocation )
if GameRules:GetGameTime() - self.flLastThinkTime >= self.spawn_interval then
self.flLastThinkTime = GameRules:GetGameTime()
if self:GetCaster().Encounter and self:GetCaster().Encounter:GetRoom() and self:GetCaster().Encounter:GetRoom():IsInRoomBounds( vLocation ) then
self:SpawnHarpy(vLocation)
end
end
end
--------------------------------------------------------------------------------
function aghsfort_enraged_wildwing_tornado_blast:OnProjectileHit( hTarget, vLocation )
if hTarget ~= nil then
local damage = {
victim = hTarget,
attacker = self:GetCaster(),
damage = self.damage,
damage_type = DAMAGE_TYPE_MAGICAL,
ability = this,
}
ApplyDamage( damage )
if not hTarget:FindModifierByName("modifier_aghsfort_wildwing_tornado_blast_debuff") then
hTarget:AddNewModifier( self:GetCaster(), self, "modifier_aghsfort_wildwing_tornado_blast_debuff", { duration = self.disable_duration} )
end
end
return false
end
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function aghsfort_enraged_wildwing_tornado_blast:SpawnHarpy( vLocation )
if IsServer() then
for i = 1, self.harpy_spawn_amount do
local hHarpy = CreateUnitByName( "npc_aghsfort_creature_tornado_harpy", vLocation, true, self:GetCaster(), self:GetCaster(), self:GetCaster():GetTeamNumber() )
local nMaxDistance = 200
local vLoc = FindPathablePositionNearby(vLocation, 150, nMaxDistance )
if hHarpy ~= nil then
hHarpy:SetInitialGoalEntity( self:GetCaster().hInitialGoalEntity )
hHarpy:SetDeathXP( 0 )
hHarpy:SetMinimumGoldBounty( 0 )
hHarpy:SetMaximumGoldBounty( 0 )
local kv =
{
vLocX = vLoc.x,
vLocY = vLoc.y,
vLocZ = vLoc.z,
}
hHarpy:AddNewModifier( self:GetCaster(), self, "modifier_frostivus2018_broodbaby_launch", kv )
end
end
self.nPreviewFX = ParticleManager:CreateParticle( "particles/dark_moon/darkmoon_creep_warning.vpcf", PATTACH_CUSTOMORIGIN, self:GetCaster() )
ParticleManager:SetParticleControlEnt( self.nPreviewFX, 0, self:GetCaster(), PATTACH_CUSTOMORIGIN, nil, vLocation, true )
ParticleManager:SetParticleControl( self.nPreviewFX, 1, Vector( 100, 100, 100 ) )
ParticleManager:SetParticleControl( self.nPreviewFX, 15, Vector( 29, 55, 184 ) )
self.flLastHarpyTime = GameRules:GetGameTime()
EmitSoundOn( "Creature_Bomb_Squad.LandMine.Plant", hHarpy )
end
return
end
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

View File

@@ -1,37 +0,0 @@
aghsfort_naga_siren_mirror_image = class({})
--------------------------------------------------------------------------------
function aghsfort_naga_siren_mirror_image:Precache( context )
end
--------------------------------------------------------------------------------
function aghsfort_naga_siren_mirror_image:OnSpellStart()
print("Mirror Image")
local caster = self:GetCaster()
local vPos = caster:GetOrigin()
local effect_name = "particles/units/heroes/hero_siren/naga_siren_mirror_image.vpcf"
local hEffects = ParticleManager:CreateParticle( effect_name, PATTACH_CUSTOMORIGIN, caster )
caster:SetContextThink( "KillEffects", function() return self:KillEffects( hEffects ) end, 2 )
EmitSoundOn( "Hero_NagaSiren.MirrorImage", self:GetCaster() )
local enemies = FindUnitsInRadius( DOTA_TEAM_BADGUYS, vPos, nil, FIND_UNITS_EVERYWHERE, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES + DOTA_UNIT_TARGET_FLAG_FOW_VISIBLE, FIND_CLOSEST, false )
local illusion_name = "npc_dota_creature_naga_siren_illusion"
local illusion_origin = vPos
local illusion = CreateUnitByName(illusion_name, illusion_origin, true, caster, nil, DOTA_TEAM_BADGUYS)
illusion:SetInitialGoalEntity( enemies )
end
--------------------------------------------------------------------------------
function aghsfort_naga_siren_mirror_image:KillEffects( hEffects )
if hEffects ~= nil then
ParticleManager:DestroyParticle( hEffects, false )
end
end
--------------------------------------------------------------------------------

View File

@@ -1,69 +0,0 @@
aghsfort_waveblaster_summon_ghost = class({})
LinkLuaModifier( "modifier_aghsfort_waveblaster_summon_ghost_thinker", "modifiers/creatures/modifier_aghsfort_waveblaster_summon_ghost_thinker", LUA_MODIFIER_MOTION_NONE )
----------------------------------------------------------------------------------------
function aghsfort_waveblaster_summon_ghost:Precache( context )
PrecacheResource( "particle", "particles/themed_fx/tower_dragon_black_smokering.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_visage/visage_summon_familiars.vpcf", context )
PrecacheResource( "particle", "particles/nyx_swarm_explosion/nyx_swarm_explosion.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_nyx_assassin/nyx_assassin_burrow_exit.vpcf", context )
PrecacheUnitByNameSync( "npc_dota_creature_zealot_mound", context, -1 )
PrecacheUnitByNameSync( "npc_dota_creature_zealot_scarab", context, -1 )
end
--------------------------------------------------------------------------------
function aghsfort_waveblaster_summon_ghost:ProcsMagicStick()
return false
end
--------------------------------------------------------------------------------
function aghsfort_waveblaster_summon_ghost:OnSpellStart()
if not IsServer() then
return
end
if self:GetCaster() == nil or self:GetCaster():IsNull() then
return
end
local nSummonCount = self:GetSpecialValueFor( "spawn_count" )
local flSpawnDistance = self:GetSpecialValueFor( "spawn_distance" )
local flDuration = self:GetSpecialValueFor( "spawn_delay" )
local flDeltaAngle = 360 / nSummonCount
local vAngles = QAngle( 0, math.random( 0, flDeltaAngle ), 0 )
for i = 1,nSummonCount do
local vSpawnPosition = nil
for s = 1,36 do
local vDir = AnglesToVector( vAngles )
local vTest = self:GetCaster():GetAbsOrigin() + vDir * flSpawnDistance + math.random( -25, 25 )
if GameRules.Aghanim:GetCurrentRoom():IsValidSpawnPoint( vTest ) then
vSpawnPosition = vTest
break
end
vAngles.y = vAngles.y + 10
end
vAngles.y = vAngles.y + flDeltaAngle + math.random( -20, 20 )
if vSpawnPosition ~= nil then
CreateModifierThinker( self:GetCaster(), self, "modifier_aghsfort_waveblaster_summon_ghost_thinker", {duration = flDuration }, self:GetCaster():GetAbsOrigin(), self:GetCaster():GetTeamNumber(), false )
end
end
end
--------------------------------------------------------------------------------

View File

@@ -1,11 +0,0 @@
aghsfort_wisp_autoattack = class({})
LinkLuaModifier( "modifier_aghsfort_wisp_autoattack", "modifiers/creatures/modifier_aghsfort_wisp_autoattack", LUA_MODIFIER_MOTION_NONE )
-----------------------------------------------------------------------------------------
function aghsfort_wisp_autoattack:GetIntrinsicModifierName()
return "modifier_aghsfort_wisp_autoattack"
end
-----------------------------------------------------------------------------------------

View File

@@ -1,26 +0,0 @@
baby_broodmother_passive = class({})
LinkLuaModifier( "modifier_baby_broodmother_passive", "modifiers/creatures/modifier_baby_broodmother_passive", LUA_MODIFIER_MOTION_NONE )
--LinkLuaModifier( "modifier_baby_broodmother_venom_pool", "modifiers/creatures/modifier_baby_broodmother_venom_pool", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------------------
function baby_broodmother_passive:Precache( context )
PrecacheResource( "particle", "particles/baby_brood_venom_pool.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_viper/viper_nethertoxin_debuff.vpcf", context )
PrecacheResource( "particle", "particles/generic_gameplay/generic_silenced_lanecreeps.vpcf", context )
PrecacheResource( "particle", "particles/generic_gameplay/generic_silenced.vpcf", context )
PrecacheResource( "particle", "particles/generic_gameplay/generic_break.vpcf", context )
end
--------------------------------------------------------------------------------
function baby_broodmother_passive:GetIntrinsicModifierName()
return "modifier_baby_broodmother_passive"
end
--------------------------------------------------------------------------------

View File

@@ -1,57 +0,0 @@
baby_ogre_magi_area_ignite = class ({})
LinkLuaModifier( "modifier_ogre_magi_area_ignite_thinker", "modifiers/creatures/modifier_ogre_magi_area_ignite_thinker", LUA_MODIFIER_MOTION_NONE )
----------------------------------------------------------------------------------------
function baby_ogre_magi_area_ignite:Precache( context )
PrecacheResource( "particle", "particles/units/heroes/hero_ogre_magi/ogre_magi_ignite.vpcf", context )
PrecacheResource( "particle", "particles/neutral_fx/black_dragon_fireball.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_ogre_magi/ogre_magi_ignite_debuff.vpcf", context )
PrecacheResource( "particle", "particles/status_fx/status_effect_burn.vpcf", context )
end
----------------------------------------------------------------------------------------
function baby_ogre_magi_area_ignite:OnSpellStart()
if IsServer() then
self.hThinker = CreateModifierThinker( self:GetCaster(), self, "modifier_ogre_magi_area_ignite_thinker", { duration = -1 }, self:GetCursorPosition(), self:GetCaster():GetTeamNumber(), false )
if self.hThinker ~= nil then
local projectile =
{
Target = self.hThinker,
Source = self:GetCaster(),
Ability = self,
EffectName = "particles/units/heroes/hero_ogre_magi/ogre_magi_ignite.vpcf",
iMoveSpeed = self:GetSpecialValueFor( "projectile_speed" ),
vSourceLoc = self:GetCaster():GetOrigin(),
bDodgeable = false,
bProvidesVision = false,
}
ProjectileManager:CreateTrackingProjectile( projectile )
EmitSoundOn( "OgreMagi.Ignite.Cast", self:GetCaster() )
end
end
end
----------------------------------------------------------------------------------------
function baby_ogre_magi_area_ignite:OnProjectileHit( hTarget, vLocation )
if IsServer() then
if self.hThinker ~= nil then
local hBuff = self.hThinker:FindModifierByName( "modifier_ogre_magi_area_ignite_thinker" )
if hBuff ~= nil then
hBuff:OnIntervalThink()
end
self.hThinker = nil;
end
end
return true
end
----------------------------------------------------------------------------------------

View File

@@ -1,35 +0,0 @@
baby_ogre_tank_jump_smash = class({})
LinkLuaModifier( "modifier_ogre_tank_melee_smash_thinker", "modifiers/creatures/modifier_ogre_tank_melee_smash_thinker", LUA_MODIFIER_MOTION_NONE )
----------------------------------------------------------------------------------------
function baby_ogre_tank_jump_smash:Precache( context )
PrecacheResource( "particle", "particles/creatures/ogre/ogre_melee_smash.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_phantom_assassin/phantom_assassin_crit_impact.vpcf", context )
end
-----------------------------------------------------------------------------
function baby_ogre_tank_jump_smash:ProcsMagicStick()
return false
end
-----------------------------------------------------------------------------
function baby_ogre_tank_jump_smash:GetPlaybackRateOverride()
return 0.75
end
-----------------------------------------------------------------------------
function baby_ogre_tank_jump_smash:OnSpellStart()
if IsServer() then
local hThinker = CreateModifierThinker( self:GetCaster(), self, "modifier_ogre_tank_melee_smash_thinker", { duration = self:GetSpecialValueFor( "jump_speed") }, self:GetCaster():GetOrigin(), self:GetCaster():GetTeamNumber(), false )
end
end
-----------------------------------------------------------------------------

View File

@@ -1,44 +0,0 @@
baby_ogre_tank_melee_smash = class({})
----------------------------------------------------------------------------------------
function baby_ogre_tank_melee_smash:Precache( context )
PrecacheResource( "particle", "particles/creatures/ogre/ogre_melee_smash.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_phantom_assassin/phantom_assassin_crit_impact.vpcf", context )
end
-----------------------------------------------------------------------------
function baby_ogre_tank_melee_smash:ProcsMagicStick()
return false
end
-----------------------------------------------------------------------------
function baby_ogre_tank_melee_smash:GetCooldown( iLevel )
return self.BaseClass.GetCooldown( self, self:GetLevel() ) / self:GetCaster():GetHasteFactor()
end
-----------------------------------------------------------------------------
function baby_ogre_tank_melee_smash:GetPlaybackRateOverride()
return math.min( 2.0, math.max( self:GetCaster():GetHasteFactor(), 0.75 ) )
end
-----------------------------------------------------------------------------
function baby_ogre_tank_melee_smash:OnSpellStart()
if IsServer() then
EmitSoundOn( "OgreTank.Grunt", self:GetCaster() )
local flSpeed = self:GetSpecialValueFor( "base_swing_speed" ) / self:GetPlaybackRateOverride()
local vToTarget = self:GetCursorPosition() - self:GetCaster():GetOrigin()
vToTarget = vToTarget:Normalized()
local vTarget = self:GetCaster():GetOrigin() + vToTarget * self:GetCastRange( self:GetCaster():GetOrigin(), nil )
local hThinker = CreateModifierThinker( self:GetCaster(), self, "modifier_ogre_tank_melee_smash_thinker", { duration = flSpeed }, vTarget, self:GetCaster():GetTeamNumber(), false )
end
end
-----------------------------------------------------------------------------

View File

@@ -1,137 +0,0 @@
bandit_archer_arrow = class({})
LinkLuaModifier( "modifier_bandit_archer_arrow_debuff", "modifiers/creatures/modifier_bandit_archer_arrow_debuff", LUA_MODIFIER_MOTION_BOTH )
--------------------------------------------------------------------------------
function bandit_archer_arrow:Precache( context )
PrecacheResource( "particle", "particles/dungeon_bandit_archer_crescent_arrow.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_phantom_assassin/phantom_assassin_crit_impact.vpcf", context )
end
--------------------------------------------------------------------------------
function bandit_archer_arrow:ProcsMagicStick()
return false
end
--------------------------------------------------------------------------------
function bandit_archer_arrow:OnAbilityPhaseStart()
if IsServer() then
--[[
self.nPreviewFX = ParticleManager:CreateParticle( "particles/darkmoon_creep_warning.vpcf", PATTACH_ABSORIGIN_FOLLOW, self:GetCaster() )
ParticleManager:SetParticleControlEnt( self.nPreviewFX, 0, self:GetCaster(), PATTACH_ABSORIGIN_FOLLOW, nil, self:GetCaster():GetOrigin(), true )
ParticleManager:SetParticleControl( self.nPreviewFX, 1, Vector( 60, 60, 60 ) )
ParticleManager:SetParticleControl( self.nPreviewFX, 15, Vector( 188, 26, 26 ) )
]]
--EmitSoundOn( "Dungeon.ArcherPullArrow", self:GetCaster() )
--self:GetCaster():AddNewModifier( self:GetCaster(), nil, "modifier_provide_vision", { duration = 1.5 } )
end
return true
end
--------------------------------------------------------------------------------
function bandit_archer_arrow:OnAbilityPhaseInterrupted()
if IsServer() then
--ParticleManager:DestroyParticle( self.nPreviewFX, false )
--StopSoundOn( "Dungeon.ArcherPullArrow", self:GetCaster() )
end
end
-----------------------------------------------------------------------------
--[[
function bandit_archer_arrow:GetPlaybackRateOverride()
return 0.75
end
]]
--------------------------------------------------------------------------------
function bandit_archer_arrow:OnSpellStart()
if IsServer() then
--ParticleManager:DestroyParticle( self.nPreviewFX, false )
--StopSoundOn( "Dungeon.ArcherPullArrow", self:GetCaster() )
self.attack_speed = self:GetSpecialValueFor( "attack_speed" )
self.attack_width_initial = self:GetSpecialValueFor( "attack_width_initial" )
self.attack_width_end = self:GetSpecialValueFor( "attack_width_end" )
self.attack_distance = self:GetSpecialValueFor( "attack_distance" )
self.attack_damage = self:GetSpecialValueFor( "attack_damage" )
self.duration = self:GetSpecialValueFor( "duration" )
self.break_duration = self:GetSpecialValueFor( "break_duration" )
local vPos = nil
if self:GetCursorTarget() then
vPos = self:GetCursorTarget():GetOrigin()
else
vPos = self:GetCursorPosition()
end
local vDirection = vPos - self:GetCaster():GetOrigin()
vDirection.z = 0.0
vDirection = vDirection:Normalized()
self.attack_speed = self.attack_speed * ( self.attack_distance / ( self.attack_distance - self.attack_width_initial ) )
local info = {
EffectName = "particles/dungeon_bandit_archer_crescent_arrow.vpcf",
Ability = self,
vSpawnOrigin = self:GetCaster():GetOrigin(),
fStartRadius = self.attack_width_initial,
fEndRadius = self.attack_width_end,
vVelocity = vDirection * self.attack_speed,
fDistance = self.attack_distance,
Source = self:GetCaster(),
iUnitTargetTeam = DOTA_UNIT_TARGET_TEAM_ENEMY,
iUnitTargetType = DOTA_UNIT_TARGET_HERO,
}
ProjectileManager:CreateLinearProjectile( info )
EmitSoundOn( "Dungeon.ArcherShootArrow", self:GetCaster() )
end
end
--------------------------------------------------------------------------------
function bandit_archer_arrow:OnProjectileHit( hTarget, vLocation )
if IsServer() then
if hTarget ~= nil and ( not hTarget:IsMagicImmune() ) and ( not hTarget:IsInvulnerable() ) then
local damage = {
victim = hTarget,
attacker = self:GetCaster(),
damage = self.attack_damage,
damage_type = self:GetAbilityDamageType(),
ability = self
}
ApplyDamage( damage )
hTarget:AddNewModifier( self:GetCaster(), nil, "modifier_bandit_archer_arrow_debuff", { duration = self.break_duration } )
local nFXIndex = ParticleManager:CreateParticle( "particles/units/heroes/hero_phantom_assassin/phantom_assassin_crit_impact.vpcf", PATTACH_CUSTOMORIGIN, nil )
ParticleManager:SetParticleControlEnt( nFXIndex, 0, hTarget, PATTACH_POINT_FOLLOW, "attach_hitloc", hTarget:GetOrigin(), true )
ParticleManager:SetParticleControl( nFXIndex, 1, hTarget:GetOrigin() )
if self:GetCaster() then
ParticleManager:SetParticleControlForward( nFXIndex, 1, -self:GetCaster():GetForwardVector() )
end
ParticleManager:SetParticleControlEnt( nFXIndex, 10, hTarget, PATTACH_ABSORIGIN_FOLLOW, nil, hTarget:GetOrigin(), true )
ParticleManager:ReleaseParticleIndex( nFXIndex )
EmitSoundOn( "Dungeon.BloodSplatterImpact", hTarget )
end
return true
end
end
--------------------------------------------------------------------------------

View File

@@ -1,133 +0,0 @@
bandit_stifling_dagger = class({})
LinkLuaModifier( "modifier_phantom_assassin_stiflingdagger_caster", "modifiers/creatures/modifier_phantom_assassin_stiflingdagger_caster", LUA_MODIFIER_MOTION_NONE )
LinkLuaModifier( "modifier_phantom_assassin_stiflingdagger", "modifiers/creatures/modifier_phantom_assassin_stiflingdagger", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------------------
function bandit_stifling_dagger:Precache( context )
PrecacheResource( "particle", "particles/creatures/bandit_captain/phantom_assassin_linear_dagger.vpcf", context )
end
--------------------------------------------------------------------------------
function bandit_stifling_dagger:OnAbilityPhaseStart()
if IsServer() then
local nRadius = 100
self.nPreviewFX = ParticleManager:CreateParticle( "particles/dark_moon/darkmoon_creep_warning.vpcf", PATTACH_ABSORIGIN_FOLLOW, self:GetCaster() )
ParticleManager:SetParticleControlEnt( self.nPreviewFX, 0, self:GetCaster(), PATTACH_ABSORIGIN_FOLLOW, nil, self:GetCaster():GetOrigin(), true )
ParticleManager:SetParticleControl( self.nPreviewFX, 1, Vector( nRadius, nRadius, nRadius ) )
ParticleManager:SetParticleControl( self.nPreviewFX, 15, Vector( 255, 26, 26 ) )
EmitSoundOn( "Creature.StartCast", self:GetCaster() )
end
return true
end
--------------------------------------------------------------------------------
function bandit_stifling_dagger:OnAbilityPhaseInterrupted()
if IsServer() then
ParticleManager:DestroyParticle( self.nPreviewFX, false )
StopSoundOn( "Creature.StartCast", self:GetCaster() )
end
end
--------------------------------------------------------------------------------
function bandit_stifling_dagger:OnSpellStart()
if IsServer() then
ParticleManager:DestroyParticle( self.nPreviewFX, false )
StopSoundOn( "Creature.StartCast", self:GetCaster() )
end
self.duration = self:GetSpecialValueFor( "duration" )
self.dagger_speed = self:GetSpecialValueFor( "dagger_speed" )
self.dagger_offset = self:GetSpecialValueFor( "dagger_offset" )
self.dagger_count = self:GetSpecialValueFor( "dagger_count" )
self.dagger_rate = self:GetSpecialValueFor( "dagger_rate" )
self.dagger_range = self:GetSpecialValueFor( "dagger_range" )
self.vTargetLocation = self:GetCursorPosition()
self.flAccumulatedTime = 0.0
self.vDirection = self.vTargetLocation - self:GetCaster():GetOrigin()
self.nDaggersThrown = 0
local vDirection = self.vTargetLocation - self:GetCaster():GetOrigin()
vDirection.z = 0.0
vDirection = vDirection:Normalized()
self:ThrowDagger( vDirection )
end
--------------------------------------------------------------------------------
function bandit_stifling_dagger:OnChannelThink( flInterval )
self.flAccumulatedTime = self.flAccumulatedTime + flInterval
if self.flAccumulatedTime >= self.dagger_rate then
self.flAccumulatedTime = self.flAccumulatedTime - self.dagger_rate
local vOffset = RandomVector( self.dagger_offset )
vOffset.z = 0.0
local vDirection = ( self.vTargetLocation + vOffset ) - self:GetCaster():GetOrigin()
vDirection.z = 0.0
vDirection = vDirection:Normalized()
self:ThrowDagger( vDirection )
end
end
--------------------------------------------------------------------------------
function bandit_stifling_dagger:OnProjectileHit( hTarget, vLocation )
if hTarget ~= nil and ( not hTarget:IsInvulnerable() ) then
local kv = {}
self:GetCaster():AddNewModifier( self:GetCaster(), self, "modifier_phantom_assassin_stiflingdagger_caster", kv )
self:GetCaster():PerformAttack( hTarget, false, true, true, true, true, false, true )
self:GetCaster():RemoveModifierByName( "modifier_phantom_assassin_stiflingdagger_caster" )
local kv =
{
duration = self.duration,
}
hTarget:AddNewModifier( self:GetCaster(), self, "modifier_phantom_assassin_stiflingdagger", kv)
EmitSoundOn( "Dungeon.BanditDagger.Target", hTarget )
end
return true
end
--------------------------------------------------------------------------------
function bandit_stifling_dagger:ThrowDagger( vDirection )
local info =
{
EffectName = "particles/creatures/bandit_captain/phantom_assassin_linear_dagger.vpcf",
Ability = self,
vSpawnOrigin = self:GetCaster():GetOrigin(),
fStartRadius = 50.0,
fEndRadius = 50.0,
vVelocity = vDirection * self.dagger_speed,
fDistance = self.dagger_range,
Source = self:GetCaster(),
iUnitTargetTeam = DOTA_UNIT_TARGET_TEAM_ENEMY,
iUnitTargetType = DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC,
}
ProjectileManager:CreateLinearProjectile( info )
EmitSoundOn( "Dungeon.BanditDagger.Cast", self:GetCaster() )
self.nDaggersThrown = self.nDaggersThrown + 1
if self.nDaggersThrown >= self.dagger_count then
self:EndChannel( false )
else
self:GetCaster():StartGestureWithPlaybackRate( ACT_DOTA_CAST_ABILITY_1, 1.33 )
end
end
--------------------------------------------------------------------------------

View File

@@ -1,26 +0,0 @@
bomb_squad_landmine_detonate = class({})
LinkLuaModifier( "modifier_bomb_squad_landmine_detonate", "modifiers/creatures/modifier_bomb_squad_landmine_detonate", LUA_MODIFIER_MOTION_NONE )
LinkLuaModifier( "modifier_bomb_squad_landmine_intrinsic", "modifiers/creatures/modifier_bomb_squad_landmine_intrinsic", LUA_MODIFIER_MOTION_NONE )
----------------------------------------------------------------------------------------
function bomb_squad_landmine_detonate:Precache( context )
PrecacheResource( "particle", "particles/econ/events/darkmoon_2017/darkmoon_calldown_marker_ring.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_techies/techies_land_mine_explode.vpcf", context )
end
--------------------------------------------------------------------------------
function bomb_squad_landmine_detonate:GetIntrinsicModifierName()
return "modifier_bomb_squad_landmine_intrinsic"
end
--------------------------------------------------------------------------------
function bomb_squad_landmine_detonate:OnSpellStart()
if IsServer() then
self:GetCaster():AddNewModifier( self:GetCaster(), self, "modifier_bomb_squad_landmine_detonate", { duration = self:GetSpecialValueFor( "duration" ) } )
end
end

View File

@@ -1,51 +0,0 @@
bomb_squad_mine_charge = class({})
LinkLuaModifier( "modifier_bomb_squad_mine_charge", "modifiers/creatures/modifier_bomb_squad_mine_charge", LUA_MODIFIER_MOTION_HORIZONTAL )
----------------------------------------------------------------------------------------
function bomb_squad_mine_charge:Precache( context )
end
--------------------------------------------------------------------------------
function bomb_squad_mine_charge:OnAbilityPhaseStart()
if IsServer() then
self:GetCaster():StartGesture( ACT_DOTA_CAST_ABILITY_2 )
end
return true
end
--------------------------------------------------------------------------------
function bomb_squad_mine_charge:OnAbilityPhaseInterrupted()
if IsServer() then
self:GetCaster():RemoveGesture( ACT_DOTA_CAST_ABILITY_2 )
end
end
--------------------------------------------------------------------------------
function bomb_squad_mine_charge:OnSpellStart()
if IsServer() then
local vTarget = self:GetCursorPosition()
local flDist = (vTarget - self:GetCaster():GetOrigin()):Length2D()
self.speed = self:GetSpecialValueFor( "speed" )
local flDuration = flDist / self.speed
local kv =
{
vLocX = vTarget.x,
vLocY = vTarget.y,
vLocZ = vTarget.z,
duration = flDuration
}
self:GetCaster():AddNewModifier( self:GetCaster(), self, "modifier_bomb_squad_mine_charge", kv )
EmitSoundOn( "OgreTank.Grunt", self:GetCaster() )
end
end

View File

@@ -1,16 +0,0 @@
--
bomb_squad_self_cast = class({})
LinkLuaModifier( "modifier_bomb_squad_self_cast", "modifiers/creatures/modifier_bomb_squad_self_cast", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------------------
function bomb_squad_self_cast:OnSpellStart()
if IsServer() then
local kv
self:GetCaster():AddNewModifier( self:GetCaster(), self, "modifier_bomb_squad_self_cast", kv )
end
end
-----------------------------------------------------------------------------

View File

@@ -1,38 +0,0 @@
bomb_squad_stasis_launch = class({})
LinkLuaModifier( "modifier_bomb_squad_stasis_trap", "modifiers/creatures/modifier_bomb_squad_stasis_trap", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
function bomb_squad_stasis_launch:Precache( context )
PrecacheResource( "particle", "particles/units/heroes/hero_techies/techies_stasis_trap_plant.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_techies/techies_stasis_trap_explode.vpcf", context )
PrecacheResource("model", "models/heroes/techies/fx_techiesfx_stasis.vmdl", context)
end
function bomb_squad_stasis_launch:OnSpellStart()
if IsServer() then
self.vTarget = self:GetCursorPosition()
local hMine = CreateUnitByName( "npc_aghsfort_creature_bomb_squad_stasis_trap", self:GetCaster():GetAbsOrigin(), true, self:GetCaster(), self:GetCaster(), self:GetCaster():GetTeamNumber() )
hMine:AddNewModifier( self:GetCaster(), self, "modifier_bomb_squad_stasis_trap", { duration = self:GetSpecialValueFor( "mine_lifetime" ) } )
hMine:SetDeathXP( 0 )
hMine:SetMinimumGoldBounty( 0 )
hMine:SetMaximumGoldBounty( 0 )
local kv =
{
vLocX = self.vTarget.x,
vLocY = self.vTarget.y,
vLocZ = self.vTarget.z,
}
hMine:SetAbsAngles( 0 , self.vTarget.y, 0 )
hMine:AddNewModifier( self:GetCaster(), self, "modifier_frostivus2018_broodbaby_launch", kv )
end
end

View File

@@ -1,19 +0,0 @@
bomber_death_explosion = class({})
LinkLuaModifier( "modifier_bomber_death_explosion_trigger", "modifiers/creatures/modifier_bomber_death_explosion_trigger", LUA_MODIFIER_MOTION_NONE )
LinkLuaModifier( "modifier_bomber_death_explosion", "modifiers/creatures/modifier_bomber_death_explosion", LUA_MODIFIER_MOTION_NONE )
-----------------------------------------------------------------------------------------
function bomber_death_explosion:Precache( context )
PrecacheResource( "particle", "particles/units/heroes/hero_techies/techies_remote_mines_detonate.vpcf", context )
PrecacheResource( "particle", "particles/dark_moon/darkmoon_calldown_marker_ring.vpcf", context )
end
-----------------------------------------------------------------------------------------
function bomber_death_explosion:GetIntrinsicModifierName()
return "modifier_bomber_death_explosion_trigger"
end
-----------------------------------------------------------------------------------------

View File

@@ -1,11 +0,0 @@
bomber_suicide_on_attack = class({})
LinkLuaModifier( "modifier_bomber_suicide_on_attack", "modifiers/creatures/modifier_bomber_suicide_on_attack", LUA_MODIFIER_MOTION_NONE )
-----------------------------------------------------------------------------------------
function bomber_suicide_on_attack:GetIntrinsicModifierName()
return "modifier_bomber_suicide_on_attack"
end
-----------------------------------------------------------------------------------------

View File

@@ -1,143 +0,0 @@
require( "utility_functions" )
boss_timbersaw_chakram_dance = class({})
LinkLuaModifier( "modifier_boss_timbersaw_chakram_dance", "modifiers/creatures/modifier_boss_timbersaw_chakram_dance", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------
function boss_timbersaw_chakram_dance:Precache( context )
PrecacheResource( "particle", "particles/units/heroes/hero_shredder/shredder_chakram_aghs.vpcf", context )
PrecacheResource( "particle", "particles/test_particle/dungeon_sand_king_channel.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_shredder/shredder_chakram_hit.vpcf", context )
PrecacheResource( "particle", "particles/status_fx/status_effect_iceblast_half.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_shredder/shredder_chakram.vpcf", context )
end
-------------------------------------------------------------------------------
function boss_timbersaw_chakram_dance:OnAbilityPhaseStart()
if IsServer() then
--EmitSoundOn( "SandKingBoss.Epicenter.spell", self:GetCaster() )
if IsGlobalAscensionCaster( self:GetCaster() ) == false then
self.nChannelFX = ParticleManager:CreateParticle( "particles/test_particle/dungeon_sand_king_channel.vpcf", PATTACH_ABSORIGIN_FOLLOW, self:GetCaster() )
end
end
return true
end
--------------------------------------------------------------------------------
function boss_timbersaw_chakram_dance:OnAbilityPhaseInterrupted()
if IsServer() then
if self.nChannelFX ~= nil then
ParticleManager:DestroyParticle( self.nChannelFX, false )
end
end
end
--------------------------------------------------------------------------------
function boss_timbersaw_chakram_dance:GetChannelAnimation()
return ACT_DOTA_GENERIC_CHANNEL_1
end
--------------------------------------------------------------------------------
function boss_timbersaw_chakram_dance:GetPlaybackRateOverride()
return 1
end
--------------------------------------------------------------------------------
function boss_timbersaw_chakram_dance:OnSpellStart()
if IsServer() then
self.hChakramAbility = self:GetCaster():FindAbilityByName( "shredder_chakram" )
if self.hChakramAbility == nil then
self.hChakramAbility = self
end
self.pass_slow_duration = self.hChakramAbility:GetSpecialValueFor( "pass_slow_duration" )
self.pass_damage = self.hChakramAbility:GetSpecialValueFor( "pass_damage" )
self.radius = self.hChakramAbility:GetSpecialValueFor( "radius" )
self.is_ascension_ability = 0
if IsGlobalAscensionCaster( self:GetCaster() ) == true then
self.is_ascension_ability = 1
end
local kv = {}
kv[ "is_ascension_ability" ] = self.is_ascension_ability
kv[ "radius"] = self.radius
self.hBuff = self:GetCaster():AddNewModifier( self:GetCaster(), self, "modifier_boss_timbersaw_chakram_dance", kv )
end
end
--------------------------------------------------------------------------------
function boss_timbersaw_chakram_dance:OnChannelFinish( bInterrupted )
if IsServer() then
self:GetCaster():RemoveModifierByName( "modifier_boss_timbersaw_chakram_dance" )
self.hBuff = nil
if self.nChannelFX ~= nil then
ParticleManager:DestroyParticle( self.nChannelFX, false )
end
end
end
--------------------------------------------------------------------------------
function boss_timbersaw_chakram_dance:OnProjectileThink( vLocation )
if IsServer() then
GridNav:DestroyTreesAroundPoint( vLocation, self.radius, true )
end
end
--------------------------------------------------------------------------------
function boss_timbersaw_chakram_dance:OnProjectileHitHandle( hTarget, vLocation, nProjectileHandle )
if IsServer() then
if hTarget == nil then
if self.hBuff == nil then
return true
end
local Chakram = self.hBuff:GetChakram( nProjectileHandle )
if Chakram == nil then
-- print( "error, chakram is nil? ")
return true
end
if Chakram.bReturning == false then
self.hBuff:ReturnChakram( Chakram, vLocation )
return true
end
elseif hTarget:IsMagicImmune() == false and hTarget:IsInvulnerable() == false then
local damageInfo =
{
victim = hTarget,
attacker = self:GetCaster(),
damage = self.pass_damage,
damage_type = DAMAGE_TYPE_PURE,
ability = self.hChakramAbility,
}
if self.is_ascension_ability == 1 then
damageInfo.damage = damageInfo.damage * hTarget:GetMaxHealth() / 100.0
end
ApplyDamage( damageInfo )
hTarget:AddNewModifier( self:GetCaster(), self.hChakramAbility, "modifier_shredder_chakram_debuff", { duration = self.pass_slow_duration } )
EmitSoundOn( "Boss_Timbersaw.Chakram.Target", hTarget )
if hTarget:IsHero() then
local nFXIndex = ParticleManager:CreateParticle( "particles/units/heroes/hero_shredder/shredder_chakram_hit.vpcf", PATTACH_CUSTOMORIGIN, nil )
ParticleManager:SetParticleControlEnt( nFXIndex, 0, hTarget, PATTACH_ABSORIGIN_FOLLOW, nil, hTarget:GetAbsOrigin(), true )
ParticleManager:SetParticleControlEnt( nFXIndex, 1, hTarget, PATTACH_POINT_FOLLOW, "attach_hitloc", hTarget:GetAbsOrigin(), true )
ParticleManager:ReleaseParticleIndex( nFXIndex )
end
return false
end
end
return true
end
-----------------------------------------------------------------------------
ascension_timbersaw_chakram_dance = boss_timbersaw_chakram_dance

View File

@@ -1,26 +0,0 @@
boss_timbersaw_reactive_armor = class({})
LinkLuaModifier( "modifier_boss_timbersaw_reactive_armor", "modifiers/creatures/modifier_boss_timbersaw_reactive_armor", LUA_MODIFIER_MOTION_NONE )
----------------------------------------------------------------------------------------
function boss_timbersaw_reactive_armor:Precache( context )
PrecacheResource( "particle", "particles/items2_fx/vanguard_active_launch.vpcf", context )
PrecacheResource( "particle", "particles/items2_fx/pipe_of_insight_launch.vpcf", context )
PrecacheResource( "particle", "particles/items2_fx/vanguard_active.vpcf", context )
PrecacheResource( "particle", "particles/items2_fx/pipe_of_insight.vpcf", context )
PrecacheResource( "particle", "particles/creatures/boss_timbersaw/shredder_armor_lyr1.vpcf", context )
PrecacheResource( "particle", "particles/creatures/boss_timbersaw/shredder_armor_lyr2.vpcf", context )
PrecacheResource( "particle", "particles/creatures/boss_timbersaw/shredder_armor_lyr3.vpcf", context )
PrecacheResource( "particle", "particles/creatures/boss_timbersaw/shredder_armor_lyr4.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_shredder/shredder_reactive_hit.vpcf", context )
end
-----------------------------------------------------------------------------------------
function boss_timbersaw_reactive_armor:GetIntrinsicModifierName()
return "modifier_boss_timbersaw_reactive_armor"
end
-----------------------------------------------------------------------------------------

View File

@@ -1,181 +0,0 @@
boss_timbersaw_timber_chain = class({})
----------------------------------------------------------------------------------------
function boss_timbersaw_timber_chain:Precache( context )
PrecacheResource( "particle", "particles/units/heroes/hero_shredder/shredder_timberchain.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_shredder/shredder_timber_chain_tree.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_shredder/shredder_timber_chain_trail.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_shredder/shredder_timber_dmg.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_shredder/shredder_tree_dmg.vpcf", context )
end
--------------------------------------------------------------------------------
--[[
function boss_timbersaw_timber_chain:OnAbilityPhaseStart()
if IsServer() then
self.chain_radius = self:GetSpecialValueFor( "chain_radius" )
self.nPreviewFX = ParticleManager:CreateParticle( "particles/dark_moon/darkmoon_creep_warning.vpcf", PATTACH_ABSORIGIN_FOLLOW, self:GetCaster() )
ParticleManager:SetParticleControlEnt( self.nPreviewFX, 0, self:GetCaster(), PATTACH_ABSORIGIN_FOLLOW, nil, self:GetCaster():GetOrigin(), true )
ParticleManager:SetParticleControl( self.nPreviewFX, 1, Vector( self.chain_radius, self.chain_radius, self.chain_radius ) )
ParticleManager:SetParticleControl( self.nPreviewFX, 15, Vector( 0, 0, 200 ) )
end
return true
end
--------------------------------------------------------------------------------
function boss_timbersaw_timber_chain:OnAbilityPhaseInterrupted()
if IsServer() then
ParticleManager:DestroyParticle( self.nPreviewFX, false )
end
end
]]--
--------------------------------------------------------------------------------
function boss_timbersaw_timber_chain:OnSpellStart()
if IsServer() then
--ParticleManager:DestroyParticle( self.nPreviewFX, false )
self.chain_radius = self:GetSpecialValueFor( "chain_radius" )
self.radius = self:GetSpecialValueFor( "radius" )
self.speed = self:GetSpecialValueFor( "speed" )
self.range = self:GetSpecialValueFor( "range" )
self.stun_duration = self:GetSpecialValueFor( "stun_duration" )
self.bRetracting = false
self.hHitTargets = {}
local vDirection = self:GetCursorPosition() - self:GetCaster():GetOrigin()
vDirection.z = 0.0
vDirection = vDirection:Normalized()
local vTargetPos = self:GetCaster():GetAbsOrigin() + ( vDirection * self.range ) + Vector( 0, 0, 96 )
self.vVelocity = vDirection * self.speed
local info =
{
Ability = self,
vSpawnOrigin = self:GetCaster():GetAbsOrigin(),
fStartRadius = self.chain_radius,
fEndRadius = self.chain_radius,
vVelocity = self.vVelocity,
fDistance = self.range,
Source = self:GetCaster(),
iUnitTargetTeam = DOTA_UNIT_TARGET_TEAM_BOTH,
iUnitTargetType = DOTA_UNIT_TARGET_TREE,
}
ProjectileManager:CreateLinearProjectile( info )
self.nFXIndex = ParticleManager:CreateParticle( "particles/units/heroes/hero_shredder/shredder_timberchain.vpcf", PATTACH_CUSTOMORIGIN, self:GetCaster() )
ParticleManager:SetParticleControlEnt( self.nFXIndex, 0, self:GetCaster(), PATTACH_POINT_FOLLOW, "attach_attack1", self:GetCaster():GetAbsOrigin() + Vector( 0, 0, 96 ), true )
ParticleManager:SetParticleControl( self.nFXIndex, 1, vTargetPos )
ParticleManager:SetParticleControl( self.nFXIndex, 2, Vector( self.speed, 0, 0 ) )
ParticleManager:SetParticleControl( self.nFXIndex, 3, Vector( 10, 0, 0 ) )
EmitSoundOn( "Hero_Shredder.TimberChain.Cast", self:GetCaster() )
end
end
--------------------------------------------------------------------------------
function boss_timbersaw_timber_chain:OnProjectileThink( vLocation )
if IsServer() then
if self.bRetracting == false then
local hTrees = GridNav:GetAllTreesAroundPoint( vLocation, self.chain_radius, true )
if #hTrees > 0 then
for _,Tree in pairs ( hTrees ) do
if Tree and Tree:IsStanding() then
local vTreeOrigin = Tree:GetAbsOrigin()
if self:GetCaster().Encounter and self:GetCaster().Encounter:GetRoom() and self:GetCaster().Encounter:GetRoom():IsInRoomBounds( vTreeOrigin ) then
self:OnProjectileHit( Tree, vTreeOrigin )
return
end
end
end
end
else
if self:GetCaster():FindModifierByName( "modifier_shredder_timber_chain" ) then
local enemies = FindUnitsInRadius( self:GetCaster():GetTeamNumber(), self:GetCaster():GetOrigin(), me, self.radius, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC, 0, 0, false )
if #enemies > 0 then
for _,enemy in pairs( enemies ) do
if enemy and self:HasHitTarget( enemy ) == false then
table.insert( self.hHitTargets, enemy )
enemy:AddNewModifier( self:GetCaster(), self, "modifier_stunned", { duration = self.stun_duration } )
end
end
end
end
end
end
end
--------------------------------------------------------------------------------
function boss_timbersaw_timber_chain:OnProjectileHit( hTarget, vLocation )
if IsServer() then
if self.bRetracting == false then
StopSoundOn( "Hero_Shredder.TimberChain.Cast", self:GetCaster() )
if hTarget ~= nil then
print( "found a tree" )
EmitSoundOnLocationWithCaster( vLocation, "Hero_Shredder.TimberChain.Impact", self:GetCaster() )
local nTreeFX = ParticleManager:CreateParticle( "particles/units/heroes/hero_shredder/shredder_timber_chain_tree.vpcf", PATTACH_CUSTOMORIGIN, self:GetCaster() )
ParticleManager:SetParticleControl( nTreeFX, 0, vLocation + Vector( 0, 0, 96 ) )
ParticleManager:ReleaseParticleIndex( nTreeFX )
local flDist = ( vLocation - self:GetCaster():GetAbsOrigin() ):Length2D()
local flDuration = flDist / self.speed
local kv = {}
kv[ "duration" ] = flDuration
kv[ "tree_index" ] = hTarget:entindex()
self:GetCaster():AddNewModifier( self:GetCaster(), self, "modifier_shredder_timber_chain", kv )
ParticleManager:SetParticleControl( self.nFXIndex, 1, vLocation + Vector( 0, 0, 96 ) )
ParticleManager:SetParticleControl( self.nFXIndex, 3, Vector( flDuration * 2 - 0.1, 0, 0 ) )
else
ParticleManager:SetParticleControlEnt( self.nFXIndex, 1, self:GetCaster(), PATTACH_ABSORIGIN_FOLLOW, "attach_attack1", self:GetCaster():GetAbsOrigin() + Vector( 0, 0, 96 ), true )
local flFailChainDuration = ( self.range * 2 ) / self.speed
ParticleManager:SetParticleControl( self.nFXIndex, 3, Vector( flFailChainDuration - 0.1, 0, 0 ) )
end
EmitSoundOn( "Hero_Shredder.TimberChain.Retract", self:GetCaster() )
self.bRetracting = true
ParticleManager:ReleaseParticleIndex( self.nFXIndex )
local info =
{
Ability = self,
vSpawnOrigin = vLocation,
vVelocity = self.vVelocity * -1,
fDistance = self.range,
Source = self:GetCaster(),
iUnitTargetTeam = DOTA_UNIT_TARGET_TEAM_BOTH,
iUnitTargetType = DOTA_UNIT_TARGET_TREE,
}
ProjectileManager:CreateLinearProjectile( info )
else
self.hHitTargets = {}
end
end
return true
end
--------------------------------------------------------------------------------
function boss_timbersaw_timber_chain:HasHitTarget( hTarget )
for _, target in pairs( self.hHitTargets ) do
if target == hTarget then
return true
end
end
return false
end

View File

@@ -1,84 +0,0 @@
boss_timbersaw_whirling_death = class({})
----------------------------------------------------------------------------------------
function boss_timbersaw_whirling_death:Precache( context )
PrecacheResource( "particle", "particles/dark_moon/darkmoon_creep_warning.vpcf", context )
PrecacheResource( "particle", "particles/creatures/boss_timbersaw/boss_timbersaw_whirling_death.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_shredder/shredder_whirling_death_debuff.vpcf", context )
end
--------------------------------------------------------------------------------
function boss_timbersaw_whirling_death:OnAbilityPhaseStart()
if IsServer() then
self.whirling_radius = self:GetSpecialValueFor( "whirling_radius" )
self.nPreviewFX = ParticleManager:CreateParticle( "particles/dark_moon/darkmoon_creep_warning.vpcf", PATTACH_ABSORIGIN_FOLLOW, self:GetCaster() )
ParticleManager:SetParticleControlEnt( self.nPreviewFX, 0, self:GetCaster(), PATTACH_ABSORIGIN_FOLLOW, nil, self:GetCaster():GetOrigin(), true )
ParticleManager:SetParticleControl( self.nPreviewFX, 1, Vector( self.whirling_radius, self.whirling_radius, self.whirling_radius ) )
ParticleManager:SetParticleControl( self.nPreviewFX, 15, Vector( 255, 26, 26 ) )
EmitSoundOn( "Hero_Shredder.WhirlingDeath.Cast", self:GetCaster() )
end
return true
end
--------------------------------------------------------------------------------
function boss_timbersaw_whirling_death:OnAbilityPhaseInterrupted()
if IsServer() then
ParticleManager:DestroyParticle( self.nPreviewFX, false )
end
end
--------------------------------------------------------------------------------
function boss_timbersaw_whirling_death:OnSpellStart()
if IsServer() then
ParticleManager:DestroyParticle( self.nPreviewFX, false )
self.duration = self:GetSpecialValueFor( "duration" )
self.whirling_damage = self:GetSpecialValueFor( "whirling_damage" )
self.tree_damage_scale = self:GetSpecialValueFor( "tree_damage_scale" )
local nFXIndex = ParticleManager:CreateParticle( "particles/creatures/boss_timbersaw/boss_timbersaw_whirling_death.vpcf", PATTACH_CUSTOMORIGIN, self:GetCaster() )
ParticleManager:SetParticleControlEnt( nFXIndex, 0, self:GetCaster(), PATTACH_POINT_FOLLOW, "attach_hitloc", self:GetCaster():GetOrigin(), true )
ParticleManager:SetParticleControlEnt( nFXIndex, 1, self:GetCaster(), PATTACH_ABSORIGIN_FOLLOW, nil, self:GetCaster():GetOrigin(), true )
ParticleManager:SetParticleControl( nFXIndex, 2, Vector( self.whirling_radius, self.whirling_radius, self.whirling_radius ) )
ParticleManager:ReleaseParticleIndex( nFXIndex )
EmitSoundOn( "Hero_Shredder.WhirlingDeath.Cast", self:GetCaster() )
local nTreeBonusDmg = 0
local hTrees = GridNav:GetAllTreesAroundPoint( self:GetCaster():GetAbsOrigin(), self.whirling_radius, true )
for _,Tree in pairs ( hTrees ) do
if Tree.IsStanding and Tree:IsStanding() then
nTreeBonusDmg = nTreeBonusDmg + self.tree_damage_scale
Tree:CutDown( self:GetTeamNumber() )
end
end
local enemies = FindUnitsInRadius( self:GetCaster():GetTeamNumber(), self:GetCaster():GetOrigin(), nil, self.whirling_radius, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC + DOTA_UNIT_TARGET_BUILDING, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES, FIND_CLOSEST, false )
for _,enemy in pairs( enemies ) do
if enemy ~= nil and enemy:IsInvulnerable() == false then
enemy:AddNewModifier( self:GetCaster(), self, "modifier_shredder_whirling_death_debuff", { duration = self.duration } )
local damageInfo =
{
victim = enemy,
attacker = self:GetCaster(),
damage = self.whirling_damage + nTreeBonusDmg,
damage_type = DAMAGE_TYPE_PURE,
ability = self,
}
ApplyDamage( damageInfo )
end
end
end
end
--------------------------------------------------------------------------------

View File

@@ -1,34 +0,0 @@
boss_visage_familiar_stone_form = class({})
LinkLuaModifier( "modifier_boss_visage_familiar_stone_form_buff", "modifiers/creatures/modifier_boss_visage_familiar_stone_form_buff", LUA_MODIFIER_MOTION_NONE )
LinkLuaModifier( "modifier_boss_visage_familiar_statue_stone_form", "modifiers/creatures/modifier_boss_visage_familiar_statue_stone_form", LUA_MODIFIER_MOTION_NONE )
LinkLuaModifier( "modifier_boss_visage_familiar_passive", "modifiers/creatures/modifier_boss_visage_familiar_passive", LUA_MODIFIER_MOTION_NONE )
----------------------------------------------------------------------------------------
function boss_visage_familiar_stone_form:Precache( context )
PrecacheResource( "particle", "particles/units/heroes/hero_visage/visage_stone_form.vpcf", context )
PrecacheResource( "particle", "particles/status_fx/status_effect_earth_spirit_petrify.vpcf", context )
PrecacheResource( "soundfile", "soundevents/game_sounds_heroes/game_sounds_visage.vsndevts", context )
end
-----------------------------------------------------------------------------
function boss_visage_familiar_stone_form:GetIntrinsicModifierName()
return "modifier_boss_visage_familiar_passive"
end
-----------------------------------------------------------------------------
function boss_visage_familiar_stone_form:OnSpellStart()
if IsServer() then
local szBuffName = "modifier_boss_visage_familiar_stone_form_buff"
if self:GetCaster():GetUnitName() == "npc_dota_boss_visage_familiar_statue" then
szBuffName = "modifier_boss_visage_familiar_statue_stone_form"
end
self:GetCaster():AddNewModifier( self:GetCaster(), self, szBuffName, {} )
self:GetCaster():StartGesture( ACT_DOTA_CAST_ABILITY_1 )
end
end
-----------------------------------------------------------------------------

View File

@@ -1,145 +0,0 @@
boss_visage_grave_chill = class({})
----------------------------------------------------------------------------------------
function boss_visage_grave_chill:Precache( context )
PrecacheResource( "particle", "particles/units/heroes/hero_visage/visage_base_attack.vpcf", context )
PrecacheResource( "soundfile", "soundevents/game_sounds_heroes/game_sounds_visage.vsndevts", context )
PrecacheResource( "particle", "particles/units/heroes/hero_necrolyte/necrolyte_pulse_enemy.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_vengeful/vengeful_wave_of_terror.vpcf", context )
end
--------------------------------------------------------------------------------
function boss_visage_grave_chill:OnAbilityPhaseStart()
if IsServer() then
EmitSoundOn( "Hero_Visage.preAttack", self:GetCaster() )
end
return true
end
--------------------------------------------------------------------------------
function boss_visage_grave_chill:OnSpellStart()
if IsServer() then
self.chill_speed = self:GetSpecialValueFor( "chill_speed" )
self.chill_radius = self:GetSpecialValueFor( "chill_radius" )
self.chill_count = self:GetSpecialValueFor( "chill_count" )
self.chill_damage = self:GetSpecialValueFor( "chill_damage" )
if self:GetCaster():GetHealthPercent() < 60 then
self.chill_speed = self.chill_speed * 2
self.chill_count = self.chill_count + 2
end
if self.bStatuesInit == nil then
--print( "setting statue pairs ")
--print ( "Num east statues " .. #self:GetCaster().EastStatues )
--print ( "Num west statues " .. #self:GetCaster().WestStatues )
for k,v in pairs ( self:GetCaster().EastStatues ) do
local flShortestDist = 9999999
local nPairIndex = nil
for i,j in pairs ( self:GetCaster().WestStatues ) do
local flDist = ( v:GetAbsOrigin() - j:GetAbsOrigin() ):Length2D()
if flDist < flShortestDist then
flShortestDist = flDist
nPairIndex = i
end
end
--print( "East statue at key " .. k .. " has partner in west at key " .. nPairIndex )
v.nTargetPairIndex = nPairIndex
self:GetCaster().WestStatues[ nPairIndex ].nTargetPairIndex = k
end
self.bStatuesInit = true
end
local bEast = true
local EastStatues = deepcopy( self:GetCaster().EastStatues )
local WestStatues = deepcopy( self:GetCaster().WestStatues )
for i=1,self.chill_count do
local hSource = nil
local hTarget = nil
local k = nil
if bEast then
k = RandomInt( 1, #EastStatues )
hSource = EastStatues[ k ]
hTarget = WestStatues[ hSource.nTargetPairIndex ]
table.remove( EastStatues, k )
table.remove( WestStatues, hSource.nTargetPairIndex )
else
k = RandomInt( 1, #WestStatues )
hSource = WestStatues[ k ]
hTarget = EastStatues[ hSource.nTargetPairIndex ]
table.remove( WestStatues, k )
table.remove( EastStatues, hSource.nTargetPairIndex )
end
if hTarget ~= nil and hSource ~= nil then
local vDirection = hTarget:GetAbsOrigin() - hSource:GetAbsOrigin()
local flDist = vDirection:Length2D()
vDirection.z = 0.0
vDirection = vDirection:Normalized()
local info =
{
EffectName = "particles/units/heroes/hero_vengeful/vengeful_wave_of_terror.vpcf",
Ability = self,
vSpawnOrigin = hSource:GetAbsOrigin(),
fStartRadius = self.chill_radius,
fEndRadius = self.chill_radius,
vVelocity = vDirection * self.chill_speed,
fDistance = flDist,
Source = self:GetCaster(),
iUnitTargetTeam = DOTA_UNIT_TARGET_TEAM_ENEMY,
iUnitTargetType = DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC + DOTA_UNIT_TARGET_BUILDING,
}
ProjectileManager:CreateLinearProjectile( info )
EmitSoundOn( "Hero_Visage.Attack", hSource )
end
bEast = not bEast
end
end
end
--------------------------------------------------------------------------------
function boss_visage_grave_chill:OnProjectileThinkHandle( nProjectileHandle )
if IsServer() then
local vLocation = ProjectileManager:GetTrackingProjectileLocation( nProjectileHandle )
local enemies = FindUnitsInRadius( self:GetCaster():GetTeamNumber(), vLocation, nil, self.chill_radius, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_HERO, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES + DOTA_UNIT_TARGET_FLAG_INVULNERABLE, FIND_CLOSEST, false )
if #enemies == 0 then
return
end
ProjectileManager:DestroyTrackingProjectile( nProjectileHandle )
end
end
----------------------------------------------------------------------------------------
function boss_visage_grave_chill:OnProjectileHitHandle( hTarget, vLocation, nProjectileHandle )
if IsServer() then
if hTarget and hTarget:IsMagicImmune() == false and hTarget:IsInvulnerable() == false then
self.chill_duration = self:GetSpecialValueFor( "chill_duration" )
hTarget:AddNewModifier( self:GetCaster(), self, "modifier_visage_grave_chill_debuff", { duration = self.chill_duration } )
EmitSoundOn( "Hero_Visage.GraveChill.Target", hTarget )
local damage =
{
victim = hTarget,
attacker = self:GetCaster(),
damage = self.chill_damage,
damage_type = DAMAGE_TYPE_MAGICAL,
ability = self,
}
ApplyDamage( damage )
end
end
return true
end

View File

@@ -1,69 +0,0 @@
boss_visage_passive = class({})
LinkLuaModifier( "modifier_boss_visage_passive", "modifiers/creatures/modifier_boss_visage_passive", LUA_MODIFIER_MOTION_NONE )
----------------------------------------------------------------------------------------
function boss_visage_passive:Precache( context )
PrecacheResource( "particle", "particles/units/heroes/hero_visage/visage_soul_assumption_bolt6.vpcf", context )
PrecacheResource( "particle", "particles/status_fx/status_effect_earth_spirit_petrify.vpcf", context )
PrecacheResource( "particle", "particles/act_2/storegga_channel.vpcf", context )
PrecacheResource( "soundfile", "soundevents/game_sounds_heroes/game_sounds_visage.vsndevts", context )
PrecacheResource( "soundfile", "soundevents/voscripts/game_sounds_vo_visage.vsndevts", context )
end
----------------------------------------------------------------------------------------
function boss_visage_passive:GetIntrinsicModifierName()
return "modifier_boss_visage_passive"
end
-------------------------------------------------------------------------------
function boss_visage_passive:OnProjectileThinkHandle( nProjectileHandle )
if IsServer() and self:GetCaster() ~= nil then
self.soul_assumption_radius = self:GetSpecialValueFor( "soul_assumption_radius" )
local vLocation = ProjectileManager:GetTrackingProjectileLocation( nProjectileHandle )
local hFamiliars = FindUnitsInRadius( self:GetCaster():GetTeamNumber(), vLocation, nil, self.soul_assumption_radius, DOTA_UNIT_TARGET_TEAM_FRIENDLY, DOTA_UNIT_TARGET_BASIC, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES + DOTA_UNIT_TARGET_FLAG_INVULNERABLE, FIND_CLOSEST, false )
for _,Familiar in pairs ( hFamiliars ) do
if Familiar ~= nil and Familiar:GetUnitName() == "npc_dota_boss_visage_familiar" then
self:WakeFamiliar( Familiar )
ProjectileManager:DestroyTrackingProjectile( nProjectileHandle )
end
end
end
end
--------------------------------------------------------------------------------
function boss_visage_passive:WakeFamiliar( hFamiliar )
if IsServer() then
print( "Waking familiar!" )
hFamiliar:RemoveModifierByName( "modifier_boss_visage_familiar_stone_form_buff" )
end
end
--------------------------------------------------------------------------------
function boss_visage_passive:OnProjectileHit( hTarget, vLocation )
if IsServer() == false or hTarget == nil then
return true
end
if hTarget:IsMagicImmune() == false and hTarget:IsInvulnerable() == false then
local damageInfo =
{
victim = hTarget,
attacker = self:GetCaster(),
damage = self:GetSpecialValueFor( "soul_assumption_damage" ),
damage_type = DAMAGE_TYPE_MAGICAL,
ability = self,
}
ApplyDamage( damageInfo )
EmitSoundOn( "Hero_Visage.SoulAssumption.Target", hTarget )
end
return true
end

View File

@@ -1,93 +0,0 @@
boss_visage_ranged_attack = class({})
----------------------------------------------------------------------------------------
function boss_visage_ranged_attack:Precache( context )
PrecacheResource( "particle", "particles/creatures/visage_boss_base_attack.vpcf", context )
PrecacheResource( "particle", "particles/creatures/quill_beast/test_model_cluster_linear_projectile.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_bristleback/bristleback_quill_spray_impact.vpcf", context )
PrecacheResource( "soundfile", "soundevents/game_sounds_heroes/game_sounds_visage.vsndevts", context )
self.Projectiles = {}
end
--------------------------------------------------------------------------------
function boss_visage_ranged_attack:OnAbilityPhaseStart()
if IsServer() then
EmitSoundOn( "Hero_Visage.preAttack", self:GetCaster() )
end
return true
end
--------------------------------------------------------------------------------
function boss_visage_ranged_attack:OnSpellStart()
if IsServer() then
self.attack_speed = self:GetSpecialValueFor( "attack_speed" )
self.attack_width_initial = self:GetSpecialValueFor( "attack_width_initial" )
self.attack_width_end = self:GetSpecialValueFor( "attack_width_end" )
self.attack_distance = self:GetSpecialValueFor( "attack_distance" )
self.attack_damage = self:GetSpecialValueFor( "attack_damage" )
local vPos = nil
if self:GetCursorTarget() then
vPos = self:GetCursorTarget():GetOrigin()
else
vPos = self:GetCursorPosition()
end
local vDirection = vPos - self:GetCaster():GetOrigin()
vDirection.z = 0.0
vDirection = vDirection:Normalized()
self.attack_speed = self.attack_speed * ( self.attack_distance / ( self.attack_distance - self.attack_width_initial ) )
local info = {
EffectName = "particles/creatures/quill_beast/test_model_cluster_linear_projectile.vpcf",
Ability = self,
vSpawnOrigin = self:GetCaster():GetAttachmentOrigin( self:GetCaster():ScriptLookupAttachment( "attach_attack1" ) ),
fStartRadius = self.attack_width_initial,
fEndRadius = self.attack_width_end,
vVelocity = vDirection * self.attack_speed,
fDistance = self.attack_distance,
Source = self:GetCaster(),
iUnitTargetTeam = DOTA_UNIT_TARGET_TEAM_ENEMY,
iUnitTargetType = DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC + DOTA_UNIT_TARGET_BUILDING,
}
ProjectileManager:CreateLinearProjectile( info )
EmitSoundOn( "Hero_Visage.Attack", self:GetCaster() )
end
end
--------------------------------------------------------------------------------
function boss_visage_ranged_attack:OnProjectileHit( hTarget, vLocation )
if IsServer() then
if hTarget ~= nil and ( not hTarget:IsMagicImmune() ) and ( not hTarget:IsInvulnerable() ) then
local damage = {
victim = hTarget,
attacker = self:GetCaster(),
damage = self.attack_damage,
damage_type = DAMAGE_TYPE_PHYSICAL,
ability = self
}
ApplyDamage( damage )
local nFXIndex = ParticleManager:CreateParticle( "particles/units/heroes/hero_bristleback/bristleback_quill_spray_impact.vpcf", PATTACH_CUSTOMORIGIN, hTarget );
ParticleManager:SetParticleControlEnt( nFXIndex, 0, hTarget, PATTACH_ABSORIGIN_FOLLOW, nil, hTarget:GetOrigin(), true );
ParticleManager:SetParticleControlEnt( nFXIndex, 1, hTarget, PATTACH_POINT_FOLLOW, "attach_hitloc", hTarget:GetOrigin(), true );
ParticleManager:SetParticleControlEnt( nFXIndex, 2, self:GetCaster(), PATTACH_ABSORIGIN_FOLLOW, nil, hTarget:GetOrigin(), true );
ParticleManager:ReleaseParticleIndex( nFXIndex );
EmitSoundOn( "Hero_Visage.projectileImpact", hTarget )
end
return true
end
end
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

View File

@@ -1,12 +0,0 @@
brewmaster_unit_passive = class({})
LinkLuaModifier( "modifier_brewmaster_unit_passive", "modifiers/creatures/modifier_brewmaster_unit_passive", LUA_MODIFIER_MOTION_NONE )
-----------------------------------------------------------------------------------------
function brewmaster_unit_passive:GetIntrinsicModifierName()
return "modifier_brewmaster_unit_passive"
end
-----------------------------------------------------------------------------------------

View File

@@ -1,22 +0,0 @@
broodmother_accrue_children = class({})
LinkLuaModifier( "modifier_broodmother_accrue_children", "modifiers/creatures/modifier_broodmother_accrue_children", LUA_MODIFIER_MOTION_NONE )
LinkLuaModifier( "modifier_broodmother_generate_children", "modifiers/creatures/modifier_broodmother_generate_children", LUA_MODIFIER_MOTION_NONE )
----------------------------------------------------------------------------------------
function broodmother_accrue_children:Precache( context )
PrecacheUnitByNameSync( "npc_dota_dummy_caster", context, -1 )
PrecacheResource( "particle", "particles/baby_brood_venom_pool.vpcf", context )
PrecacheUnitByNameSync( "npc_dota_creature_broodmother_baby_c", context, -1 )
end
--------------------------------------------------------------------------------
function broodmother_accrue_children:GetIntrinsicModifierName()
return "modifier_broodmother_accrue_children"
end
--------------------------------------------------------------------------------

View File

@@ -1,22 +0,0 @@
-- Note: this ability gets added by hand to the dummy unit that Broodmother creates.
broodmother_generate_children = class({})
LinkLuaModifier( "modifier_broodmother_generate_children", "modifiers/creatures/modifier_broodmother_generate_children", LUA_MODIFIER_MOTION_NONE )
----------------------------------------------------------------------------------------
function broodmother_generate_children:Precache( context )
PrecacheResource( "particle", "particles/baby_brood_venom_pool.vpcf", context )
PrecacheUnitByNameSync( "npc_dota_creature_broodmother_baby_c", context, -1 )
end
--------------------------------------------------------------------------------
function broodmother_generate_children:GetIntrinsicModifierName()
return "modifier_broodmother_generate_children"
end
--------------------------------------------------------------------------------

View File

@@ -1,123 +0,0 @@
broodmother_web = class({})
LinkLuaModifier( "modifier_broodmother_web", "modifiers/creatures/modifier_broodmother_web", LUA_MODIFIER_MOTION_NONE )
----------------------------------------------------------------------------------------
function broodmother_web:Precache( context )
PrecacheResource( "particle", "particles/dark_moon/darkmoon_creep_warning.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_venomancer/venomancer_venomous_gale.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_venomancer/venomancer_venomous_gale_impact.vpcf", context )
PrecacheResource( "particle", "particles/items2_fx/rod_of_atos.vpcf", context )
end
--------------------------------------------------------------------------------
function broodmother_web:ProcsMagicStick()
return false
end
--------------------------------------------------------------------------------
function broodmother_web:OnAbilityPhaseStart()
if IsServer() then
self.nPreviewFX = ParticleManager:CreateParticle( "particles/dark_moon/darkmoon_creep_warning.vpcf", PATTACH_ABSORIGIN_FOLLOW, self:GetCaster() )
ParticleManager:SetParticleControlEnt( self.nPreviewFX, 0, self:GetCaster(), PATTACH_ABSORIGIN_FOLLOW, nil, self:GetCaster():GetOrigin(), true )
ParticleManager:SetParticleControl( self.nPreviewFX, 1, Vector( 100, 100, 100 ) )
ParticleManager:SetParticleControl( self.nPreviewFX, 15, Vector( 255, 0, 100 ) )
end
return true
end
--------------------------------------------------------------------------------
function broodmother_web:OnAbilityPhaseInterrupted()
if IsServer() then
ParticleManager:DestroyParticle( self.nPreviewFX, false )
end
end
--------------------------------------------------------------------------------
function broodmother_web:OnSpellStart()
if IsServer() then
ParticleManager:DestroyParticle( self.nPreviewFX, false )
self.projectile_distance = self:GetSpecialValueFor( "projectile_distance" )
self.projectile_speed = self:GetSpecialValueFor( "projectile_speed" )
self.projectile_radius = self:GetSpecialValueFor( "projectile_radius" )
self.damage = self:GetSpecialValueFor( "damage" )
self.root_duration = self:GetSpecialValueFor( "root_duration" )
self.knockback_distance = self:GetSpecialValueFor( "knockback_distance" )
self.knockback_height = self:GetSpecialValueFor( "knockback_height" )
self.knockback_duration = self:GetSpecialValueFor( "knockback_duration" )
local vPos = self:GetCursorPosition()
local vDirection = vPos - self:GetCaster():GetOrigin()
vDirection.z = 0.0
vDirection = vDirection:Normalized()
local info = {
EffectName = "particles/units/heroes/hero_venomancer/venomancer_venomous_gale.vpcf",
Ability = self,
vSpawnOrigin = self:GetCaster():GetOrigin(),
fStartRadius = self.projectile_radius,
fEndRadius = self.projectile_radius,
vVelocity = vDirection * self.projectile_speed,
fDistance = self.projectile_distance,
Source = self:GetCaster(),
iUnitTargetTeam = self:GetAbilityTargetTeam(),
iUnitTargetType = self:GetAbilityTargetType(),
}
ProjectileManager:CreateLinearProjectile( info )
EmitSoundOn( "Spider.PoisonSpit", self:GetCaster() )
end
end
--------------------------------------------------------------------------------
function broodmother_web:OnProjectileHit( hTarget, vLocation )
if IsServer() then
if hTarget ~= nil and ( not hTarget:IsMagicImmune() ) and ( not hTarget:IsInvulnerable() ) then
local damage =
{
victim = hTarget,
attacker = self:GetCaster(),
damage = self.damage,
damage_type = self:GetAbilityDamageType(),
ability = self,
}
ApplyDamage( damage )
local kv_knockback =
{
center_x = vLocation.x,
center_y = vLocation.y,
center_z = vLocation.z,
should_stun = false,
duration = self.knockback_duration,
knockback_duration = self.knockback_duration,
knockback_distance = self.knockback_distance,
knockback_height = self.knockback_height,
}
hTarget:AddNewModifier( self:GetCaster(), self, "modifier_knockback", kv_knockback )
hTarget:AddNewModifier( self:GetCaster(), self, "modifier_broodmother_web", { duration = self.root_duration } )
ParticleManager:ReleaseParticleIndex( ParticleManager:CreateParticle( "particles/units/heroes/hero_venomancer/venomancer_venomous_gale_impact.vpcf", PATTACH_ABSORIGIN_FOLLOW, hTarget ) )
EmitSoundOn( "Spider.PoisonSpit.Impact", self:GetCaster() )
end
return true
end
end
--------------------------------------------------------------------------------

View File

@@ -1,75 +0,0 @@
burrower_big_explosion = class({})
----------------------------------------------------------------------------------------
function burrower_big_explosion:Precache( context )
PrecacheResource( "particle", "particles/dark_moon/darkmoon_creep_warning.vpcf", context )
PrecacheResource( "particle", "particles/nyx_swarm_explosion/nyx_swarm_explosion.vpcf", context )
end
--------------------------------------------------------------------------------
function burrower_big_explosion:OnAbilityPhaseStart()
if IsServer() then
self.radius = self:GetSpecialValueFor( "radius" )
--self.duration = self:GetSpecialValueFor( "duration" )
self.damage = self:GetSpecialValueFor( "damage" )
self.nPreviewFX = ParticleManager:CreateParticle( "particles/dark_moon/darkmoon_creep_warning.vpcf", PATTACH_ABSORIGIN_FOLLOW, self:GetCaster() )
ParticleManager:SetParticleControlEnt( self.nPreviewFX, 0, self:GetCaster(), PATTACH_ABSORIGIN_FOLLOW, nil, self:GetCaster():GetOrigin(), true )
ParticleManager:SetParticleControl( self.nPreviewFX, 1, Vector( radius, radius, radius ) )
ParticleManager:SetParticleControl( self.nPreviewFX, 15, Vector( 255, 26, 26 ) )
EmitSoundOn( "Burrower.PreSuicide", self:GetCaster() )
end
return true
end
--------------------------------------------------------------------------------
function burrower_big_explosion:OnAbilityPhaseInterrupted()
if IsServer() then
ParticleManager:DestroyParticle( self.nPreviewFX, false )
end
end
--------------------------------------------------------------------------------
function burrower_big_explosion:OnSpellStart()
if IsServer() then
ParticleManager:DestroyParticle( self.nPreviewFX, false )
local nFXIndex2 = ParticleManager:CreateParticle( "particles/nyx_swarm_explosion/nyx_swarm_explosion.vpcf", PATTACH_CUSTOMORIGIN, nil )
ParticleManager:SetParticleControlEnt( nFXIndex2, 0, self:GetCaster(), PATTACH_POINT_FOLLOW, "attach_hitloc", self:GetCaster():GetOrigin(), true )
ParticleManager:SetParticleControlEnt( nFXIndex2, 1, self:GetCaster(), PATTACH_ABSORIGIN_FOLLOW, nil, self:GetCaster():GetOrigin(), true )
ParticleManager:SetParticleControl( nFXIndex2, 2, Vector( self.radius, self.radius, self.radius ) )
ParticleManager:ReleaseParticleIndex( nFXIndex2 )
EmitSoundOn( "Burrower.Explosion", self:GetCaster() )
local enemies = FindUnitsInRadius( self:GetCaster():GetTeamNumber(), self:GetCaster():GetOrigin(), nil, self.radius, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BUILDING, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES + DOTA_UNIT_TARGET_FLAG_FOW_VISIBLE, FIND_CLOSEST, false )
for _,hEnemy in pairs( enemies ) do
if hEnemy ~= nil and hEnemy:IsAlive() and hEnemy:IsInvulnerable() == false then
local damageInfo =
{
victim = hEnemy,
attacker = self:GetCaster(),
damage = self.damage,
--damage_type = DAMAGE_TYPE_MAGICAL,
damage_type = self:GetAbilityDamageType(),
ability = self,
}
ApplyDamage( damageInfo )
--hEnemy:AddNewModifier( self:GetCaster(), self, "modifier_polar_furbolg_ursa_warrior_thunder_clap", { duration = self.duration } )
end
end
self:GetCaster():ForceKill( false )
end
end
--------------------------------------------------------------------------------

View File

@@ -1,14 +0,0 @@
creature_bonus_chicken = class({})
LinkLuaModifier( "modifier_creature_bonus_chicken", "modifiers/modifier_creature_bonus_chicken", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------------------
function creature_bonus_chicken:Precache( context )
PrecacheItemByNameSync( "item_bag_of_gold", context )
end
--------------------------------------------------------------------------------
function creature_bonus_chicken:GetIntrinsicModifierName()
return "modifier_creature_bonus_chicken"
end

View File

@@ -1,14 +0,0 @@
creature_bonus_greevil = class({})
LinkLuaModifier( "modifier_creature_bonus_greevil", "modifiers/modifier_creature_bonus_greevil", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------------------
function creature_bonus_greevil:Precache( context )
PrecacheItemByNameSync( "item_bag_of_gold", context )
end
--------------------------------------------------------------------------------
function creature_bonus_greevil:GetIntrinsicModifierName()
return "modifier_creature_bonus_greevil"
end

View File

@@ -1,8 +0,0 @@
creature_generic_high_status_resist_passive = class({})
LinkLuaModifier( "modifier_creature_generic_high_status_resist_passive", "modifiers/creatures/modifier_creature_generic_high_status_resist_passive", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------------------
function creature_generic_high_status_resist_passive:GetIntrinsicModifierName()
return "modifier_creature_generic_high_status_resist_passive"
end

View File

@@ -1,10 +0,0 @@
creature_landmine_detonate = class({})
LinkLuaModifier( "modifier_creature_landmine_detonate", "modifiers/creatures/modifier_creature_landmine_detonate", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------------------
function creature_landmine_detonate:OnSpellStart()
if IsServer() then
self:GetCaster():AddNewModifier( self:GetCaster(), self, "modifier_creature_landmine_detonate", { duration = self:GetSpecialValueFor( "duration" ) } )
end
end

View File

@@ -1,8 +0,0 @@
creature_pudge_miniboss_passive = class({})
LinkLuaModifier( "modifier_creature_pudge_miniboss_passive", "modifiers/creatures/modifier_creature_pudge_miniboss_passive", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------------------
function creature_pudge_miniboss_passive:GetIntrinsicModifierName()
return "modifier_creature_pudge_miniboss_passive"
end

View File

@@ -1,156 +0,0 @@
creature_shadow_wave = class({})
----------------------------------------------------------------------------------------
function creature_shadow_wave:Precache( context )
PrecacheResource( "particle", "particles/dark_moon/darkmoon_creep_warning.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_dazzle/dazzle_shadow_wave.vpcf", context )
PrecacheResource( "particle", "particles/units/heroes/hero_dazzle/dazzle_shadow_wave_impact_damage.vpcf", context )
end
--------------------------------------------------------------------------------
function creature_shadow_wave:OnAbilityPhaseStart()
if IsServer() then
self.nPreviewFX = ParticleManager:CreateParticle( "particles/dark_moon/darkmoon_creep_warning.vpcf", PATTACH_ABSORIGIN_FOLLOW, self:GetCaster() )
ParticleManager:SetParticleControlEnt( self.nPreviewFX, 0, self:GetCaster(), PATTACH_ABSORIGIN_FOLLOW, nil, self:GetCaster():GetOrigin(), true )
ParticleManager:SetParticleControl( self.nPreviewFX, 1, Vector( 75, 75, 75 ) )
ParticleManager:SetParticleControl( self.nPreviewFX, 15, Vector( 230, 100, 223 ) )
end
return true
end
--------------------------------------------------------------------------------
function creature_shadow_wave:OnAbilityPhaseInterrupted()
if IsServer() then
ParticleManager:DestroyParticle( self.nPreviewFX, false )
end
end
--------------------------------------------------------------------------------
function creature_shadow_wave:OnSpellStart()
if IsServer() then
ParticleManager:DestroyParticle( self.nPreviewFX, false )
local hTarget = self:GetCursorTarget()
if hTarget ~= nil then
self.bounce_radius = self:GetSpecialValueFor( "bounce_radius" )
self.damage_radius = self:GetSpecialValueFor( "damage_radius" )
self.damage = self:GetSpecialValueFor( "damage" )
self.max_targets = self:GetSpecialValueFor( "max_targets" )
self.nCurJumpCount = 1
self.hHitEntities = {}
local nFXIndex = ParticleManager:CreateParticle( "particles/units/heroes/hero_dazzle/dazzle_shadow_wave.vpcf", PATTACH_CUSTOMORIGIN, nil )
ParticleManager:SetParticleControlEnt( nFXIndex, 0, self:GetCaster(), PATTACH_POINT_FOLLOW, "attach_attack1", self:GetCaster():GetOrigin(), true )
ParticleManager:SetParticleControlEnt( nFXIndex, 1, hTarget, PATTACH_POINT_FOLLOW, "attach_hitloc", hTarget:GetOrigin(), true )
ParticleManager:SetParticleControl( nFXIndex, 2, Vector( self.damage_radius, 0, 0 ) )
ParticleManager:SetParticleControlEnt( nFXIndex, 3, hTarget, PATTACH_ABSORIGIN_FOLLOW, nil, hTarget:GetOrigin(), true )
ParticleManager:ReleaseParticleIndex( nFXIndex )
self.vTargetLoc = self:GetCaster():GetOrigin()
self:DoHealAndDamage( self:GetCaster() )
table.insert( self.hHitEntities, self:GetCaster() )
EmitSoundOn( "Wildwing.Shadow_Wave", self:GetCaster() )
local nFXIndex2 = ParticleManager:CreateParticle( "particles/units/heroes/hero_dazzle/dazzle_shadow_wave.vpcf", PATTACH_CUSTOMORIGIN, self:GetCaster() )
ParticleManager:SetParticleControl( nFXIndex2, 0, self:GetCaster():GetOrigin() )
ParticleManager:SetParticleControlEnt( nFXIndex2, 1, self:GetCaster(), PATTACH_POINT_FOLLOW, "attach_hitloc", self:GetCaster():GetOrigin(), true )
ParticleManager:SetParticleControl( nFXIndex2, 2, Vector( self.damage_radius, 0, 0 ) )
ParticleManager:SetParticleControlEnt( nFXIndex2, 3, self:GetCaster(), PATTACH_ABSORIGIN_FOLLOW, nil, self:GetCaster():GetOrigin(), true )
ParticleManager:ReleaseParticleIndex( nFXIndex2 )
self.vTargetLoc = hTarget:GetOrigin()
if self:GetCaster() ~= hTarget then
self:DoHealAndDamage( hTarget )
local nFXIndex3 = ParticleManager:CreateParticle( "particles/units/heroes/hero_dazzle/dazzle_shadow_wave.vpcf", PATTACH_CUSTOMORIGIN, hTarget )
ParticleManager:SetParticleControl( nFXIndex3, 0, self.vTargetLoc )
ParticleManager:SetParticleControlEnt( nFXIndex3, 1, hTarget, PATTACH_POINT_FOLLOW, "attach_hitloc", hTarget:GetOrigin(), true )
ParticleManager:SetParticleControl( nFXIndex3, 2, Vector( self.damage_radius, 0, 0 ) )
ParticleManager:SetParticleControlEnt( nFXIndex3, 3, hTarget, PATTACH_ABSORIGIN_FOLLOW, nil, hTarget:GetOrigin(), true )
ParticleManager:ReleaseParticleIndex( nFXIndex3 )
self.vTargetLoc = hTarget:GetOrigin()
table.insert( self.hHitEntities, hTarget )
else
self.nCurJumpCount = self.nCurJumpCount - 1
end
while self.nCurJumpCount < self.max_targets do
local hBestJumpTarget = nil
local friendlies = FindUnitsInRadius( self:GetCaster():GetTeamNumber(), self.vTargetLoc, self:GetCaster(), self.bounce_radius, DOTA_UNIT_TARGET_TEAM_FRIENDLY, DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES, 0, false )
for _,friendly in pairs(friendlies) do
if friendly ~= nil and not self:HasHitTarget( friendly ) then
hBestJumpTarget = friendly
end
end
if hBestJumpTarget ~= nil then
self:DoHealAndDamage( hBestJumpTarget )
local nFXIndex4 = ParticleManager:CreateParticle( "particles/units/heroes/hero_dazzle/dazzle_shadow_wave.vpcf", PATTACH_CUSTOMORIGIN, hBestJumpTarget )
ParticleManager:SetParticleControl( nFXIndex4, 0, self.vTargetLoc )
ParticleManager:SetParticleControlEnt( nFXIndex4, 1, hBestJumpTarget, PATTACH_POINT_FOLLOW, "attach_hitloc", hBestJumpTarget:GetOrigin(), true )
ParticleManager:SetParticleControl( nFXIndex4, 2, Vector( self.damage_radius, 0, 0 ) )
ParticleManager:SetParticleControlEnt( nFXIndex4, 3, hBestJumpTarget, PATTACH_ABSORIGIN_FOLLOW, nil, hBestJumpTarget:GetOrigin(), true )
ParticleManager:ReleaseParticleIndex( nFXIndex4 )
self.vTargetLoc = hBestJumpTarget:GetOrigin()
table.insert( self.hHitEntities, hTarget )
end
self.nCurJumpCount = self.nCurJumpCount + 1
end
end
end
end
--------------------------------------------------------------------------------
function creature_shadow_wave:DoHealAndDamage( hTarget )
if IsServer() then
hTarget:Heal( self.damage, self )
local enemies = FindUnitsInRadius( self:GetCaster():GetTeamNumber(), hTarget:GetOrigin(), self:GetCaster(), self.damage_radius, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES, 0, false )
if #enemies > 0 then
for _,enemy in pairs(enemies) do
if enemy ~= nil then
local damage =
{
victim = enemy,
attacker = self:GetCaster(),
damage = self.damage,
damage_type = DAMAGE_TYPE_PHYSICAL,
damage_flags = DOTA_DAMAGE_FLAG_BYPASSES_BLOCK,
ability = self
}
ApplyDamage( damage )
local vDir = enemy:GetOrigin() - hTarget:GetOrigin()
local nFXIndex = ParticleManager:CreateParticle( "particles/units/heroes/hero_dazzle/dazzle_shadow_wave_impact_damage.vpcf", PATTACH_CUSTOMORIGIN, enemy )
ParticleManager:SetParticleControlEnt( nFXIndex, 0, enemy, PATTACH_POINT_FOLLOW, "attach_hitloc", enemy:GetOrigin(), true )
ParticleManager:SetParticleControl( nFXIndex, 1, vDir )
ParticleManager:ReleaseParticleIndex( nFXIndex )
end
end
end
end
end
--------------------------------------------------------------------------------
function creature_shadow_wave:HasHitTarget( hTarget )
for _,hHitTarget in pairs ( self.hHitEntities ) do
if hHitTarget == hTarget then
return true
end
end
return false
end

View File

@@ -1,13 +0,0 @@
creature_techies_land_mine = class({})
LinkLuaModifier( "modifier_creature_techies_land_mine", "modifiers/creatures/modifier_creature_techies_land_mine", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------------------
function creature_techies_land_mine:OnSpellStart()
if IsServer() then
end
end
--------------------------------------------------------------------------------

View File

@@ -1,13 +0,0 @@
dummy_caster_passive = class({})
LinkLuaModifier( "modifier_dummy_caster_passive", "modifiers/creatures/modifier_dummy_caster_passive", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------------------
function dummy_caster_passive:GetIntrinsicModifierName()
return "modifier_dummy_caster_passive"
end
--------------------------------------------------------------------------------

View File

@@ -1,13 +0,0 @@
dummy_target_passive = class({})
LinkLuaModifier( "modifier_dummy_target_passive", "modifiers/creatures/modifier_dummy_target_passive", LUA_MODIFIER_MOTION_NONE )
--------------------------------------------------------------------------------
function dummy_target_passive:GetIntrinsicModifierName()
return "modifier_dummy_target_passive"
end
--------------------------------------------------------------------------------

View File

@@ -1,18 +0,0 @@
earth_spirit_statue_passive = class({})
LinkLuaModifier( "modifier_earth_spirit_statue_passive", "modifiers/creatures/modifier_earth_spirit_statue_passive", LUA_MODIFIER_MOTION_NONE )
LinkLuaModifier( "modifier_earth_spirit_statue_stoneform", "modifiers/creatures/modifier_earth_spirit_statue_stoneform", LUA_MODIFIER_MOTION_NONE )
-----------------------------------------------------------------------------------------
function earth_spirit_statue_passive:Precache( context )
PrecacheModel( "models/heroes/attachto_ghost/attachto_ghost.vmdl", context )
end
-----------------------------------------------------------------------------------------
function earth_spirit_statue_passive:GetIntrinsicModifierName()
return "modifier_earth_spirit_statue_passive"
end
-----------------------------------------------------------------------------------------

View File

@@ -1,15 +0,0 @@
elemental_tiny_tree_attack = class({})
function elemental_tiny_tree_attack:Precache( context )
PrecacheResource( "particle", "particles/units/heroes/hero_tiny/tiny_craggy_cleave.vpcf", context )
end
-----------------------------------------------------------------------------------------
function elemental_tiny_tree_attack:GetIntrinsicModifierName()
return "modifier_tiny_tree_grab"
end
-----------------------------------------------------------------------------------------

View File

@@ -1,107 +0,0 @@
ember_spirit_fireball = class({})
--------------------------------------------------------------------------------
function ember_spirit_fireball:Precache( context )
PrecacheResource( "particle", "particles/lycanboss_ruptureball_gale.vpcf", context )
end
--------------------------------------------------------------------------------
function ember_spirit_fireball:GetPlaybackRateOverride()
return 0.3333
end
--------------------------------------------------------------------------------
function ember_spirit_fireball:OnAbilityPhaseStart()
if IsServer() then
--EmitSoundOn( "lycan_lycan_attack_09", self:GetCaster() )
self.preview_fx_radius = self:GetSpecialValueFor( "preview_fx_radius" )
self.nPreviewFX = ParticleManager:CreateParticle( "particles/dark_moon/darkmoon_creep_warning.vpcf", PATTACH_ABSORIGIN_FOLLOW, self:GetCaster() )
ParticleManager:SetParticleControlEnt( self.nPreviewFX, 0, self:GetCaster(), PATTACH_ABSORIGIN_FOLLOW, nil, self:GetCaster():GetOrigin(), true )
ParticleManager:SetParticleControl( self.nPreviewFX, 1, Vector( self.preview_fx_radius, self.preview_fx_radius, self.preview_fx_radius ) )
ParticleManager:SetParticleControl( self.nPreviewFX, 15, Vector( 247, 86, 9 ) )
end
return true
end
--------------------------------------------------------------------------------
function ember_spirit_fireball:OnAbilityPhaseInterrupted()
if IsServer() then
ParticleManager:DestroyParticle( self.nPreviewFX, false )
end
end
--------------------------------------------------------------------------------
function ember_spirit_fireball:OnSpellStart()
if IsServer() then
ParticleManager:DestroyParticle( self.nPreviewFX, false )
self.projectile_speed = self:GetSpecialValueFor( "projectile_speed" )
self.projectile_width_initial = self:GetSpecialValueFor( "projectile_width_initial" )
self.projectile_width_end = self:GetSpecialValueFor( "projectile_width_end" )
self.projectile_distance = self:GetSpecialValueFor( "projectile_distance" )
self.impact_damage = self:GetSpecialValueFor( "impact_damage" )
local vPos = nil
if self:GetCursorTarget() then
vPos = self:GetCursorTarget():GetOrigin()
else
vPos = self:GetCursorPosition()
end
local vDirection = vPos - self:GetCaster():GetOrigin()
vDirection.z = 0.0
vDirection = vDirection:Normalized()
self.projectile_speed = self.projectile_speed * ( self.projectile_distance / ( self.projectile_distance - self.projectile_width_initial ) )
local info = {
EffectName = "particles/lycanboss_ruptureball_gale.vpcf",
Ability = self,
vSpawnOrigin = self:GetCaster():GetOrigin(),
fStartRadius = self.projectile_width_initial,
fEndRadius = self.projectile_width_end,
vVelocity = vDirection * self.projectile_speed,
fDistance = self.projectile_distance,
Source = self:GetCaster(),
iUnitTargetTeam = DOTA_UNIT_TARGET_TEAM_ENEMY,
iUnitTargetType = DOTA_UNIT_TARGET_HERO,
}
ProjectileManager:CreateLinearProjectile( info )
--EmitSoundOn( "Lycan.RuptureBall", self:GetCaster() )
end
end
--------------------------------------------------------------------------------
function ember_spirit_fireball:OnProjectileHit( hTarget, vLocation )
if IsServer() then
if hTarget ~= nil and ( not hTarget:IsMagicImmune() ) and ( not hTarget:IsInvulnerable() ) then
--EmitSoundOn( "Lycan.RuptureBall.Impact", hTarget );
hTarget:AddNewModifier( self:GetCaster(), self, "modifier_disarmed", { duration = self:GetSpecialValueFor( "disarm_duration" ) } )
local damage = {
victim = hTarget,
attacker = self:GetCaster(),
damage = self.impact_damage,
damage_type = self:GetAbilityDamageType(),
ability = self
}
ApplyDamage( damage )
end
return true
end
end
--------------------------------------------------------------------------------

View File

@@ -1,11 +0,0 @@
enraged_wildkin_tornado_passive = class({})
LinkLuaModifier( "modifier_enraged_wildkin_tornado_passive", "modifiers/creatures/modifier_enraged_wildkin_tornado_passive", LUA_MODIFIER_MOTION_NONE )
-----------------------------------------------------------------------------------------
function enraged_wildkin_tornado_passive:GetIntrinsicModifierName()
return "modifier_enraged_wildkin_tornado_passive"
end
-----------------------------------------------------------------------------------------

View File

@@ -1,95 +0,0 @@
enraged_wildwing_create_tornado = class({})
LinkLuaModifier( "modifier_enraged_wildkin_tornado_passive", "modifiers/creatures/modifier_enraged_wildkin_tornado_passive", LUA_MODIFIER_MOTION_NONE )
LinkLuaModifier( "modifier_enraged_wildkin_tornado_passive_debuff", "modifiers/creatures/modifier_enraged_wildkin_tornado_passive_debuff", LUA_MODIFIER_MOTION_NONE )
require( "aghanim_utility_functions" )
--------------------------------------------------------------------
function enraged_wildwing_create_tornado:Precache( context )
PrecacheResource( "particle", "particles/neutral_fx/tornado_ambient.vpcf", context )
PrecacheResource( "particle", "particles/dark_moon/darkmoon_creep_warning.vpcf", context )
PrecacheResource( "particle", "particles/creatures/enraged_wildkin/enraged_wildkin_tornado.vpcf", context )
PrecacheUnitByNameSync( "npc_aghsfort_creature_enraged_wildwing_tornado", context, -1 )
end
--------------------------------------------------------------------------------
function enraged_wildwing_create_tornado:OnAbilityPhaseStart()
if IsServer() then
self.nPreviewFX = ParticleManager:CreateParticle( "particles/dark_moon/darkmoon_creep_warning.vpcf", PATTACH_ABSORIGIN_FOLLOW, self:GetCaster() )
ParticleManager:SetParticleControlEnt( self.nPreviewFX, 0, self:GetCaster(), PATTACH_ABSORIGIN_FOLLOW, nil, self:GetCaster():GetOrigin(), true )
ParticleManager:SetParticleControl( self.nPreviewFX, 1, Vector( 175, 175, 175 ) )
ParticleManager:SetParticleControl( self.nPreviewFX, 15, Vector( 255, 140, 0 ) )
end
return true
end
--------------------------------------------------------------------------------
function enraged_wildwing_create_tornado:OnAbilityPhaseInterrupted()
if IsServer() then
--ParticleManager:DestroyParticle( self.nPreviewFX, false )
end
end
--------------------------------------------------------------------------------
--function enraged_wildwing_create_tornado:GetChannelAnimation()
-- return ACT_DOTA_CHANNEL_ABILITY_1
--end
--------------------------------------------------------------------------------
function enraged_wildwing_create_tornado:OnSpellStart()
if IsServer() then
ParticleManager:DestroyParticle( self.nPreviewFX, false )
local vPos = self:GetCaster():GetAbsOrigin()
for i=1,32 do
local vLoc = FindPathablePositionNearby(self:GetCaster():GetAbsOrigin(), 400, 800 )
if GameRules.Aghanim:GetCurrentRoom():IsInRoomBounds( vLoc ) then
vPos = vLoc
break
end
end
local hTornado = CreateUnitByName( "npc_aghsfort_creature_enraged_wildwing_tornado", vPos, true, self:GetCaster(), self:GetCaster(), self:GetCaster():GetTeamNumber() )
hTornado:EmitSound( "n_creep_Wildkin.Tornado" )
local szAbilityName = "enraged_wildkin_tornado_passive"
local hAbility = hTornado:FindAbilityByName(szAbilityName)
if hAbility == nil then
hAbility = hTornado:AddAbility(szAbilityName)
end
hAbility:UpgradeAbility( true )
--local kv = {
-- movespeed_pct = self:GetSpecialValueFor( "movespeed_pct" ),
-- damage = self:GetSpecialValueFor( "damage" ),
--}
--hTornado:AddNewModifier( self:GetCaster(), self, "modifier_enraged_wildkin_tornado_passive", kv )
--self.m_hTornado = hTornado
end
end
--------------------------------------------------------------------------------
--
--function enraged_wildwing_create_tornado:OnChannelFinish( bInterrupted )
-- if IsServer() then
-- if self.m_hTornado ~= nil then
-- self.m_hTornado:StopSound( "n_creep_Wildkin.Tornado" )
-- self.m_hTornado:RemoveModifierByName("modifier_enraged_wildkin_tornado_passive")
-- self.m_hTornado:ForceKill( false )
-- end
-- ParticleManager:DestroyParticle( self.nPreviewFX, false )
-- end
--end

View File

@@ -1,12 +0,0 @@
evil_greevil_passive = class({})
LinkLuaModifier( "modifier_evil_greevil_passive", "modifiers/creatures/modifier_evil_greevil_passive", LUA_MODIFIER_MOTION_NONE )
-----------------------------------------------------------------------------------------
function evil_greevil_passive:GetIntrinsicModifierName()
return "modifier_evil_greevil_passive"
end
-----------------------------------------------------------------------------------------

View File

@@ -1,103 +0,0 @@
friendly_ogreseal_flop = class({})
LinkLuaModifier( "modifier_ogreseal_flop", "modifiers/creatures/modifier_ogreseal_flop", LUA_MODIFIER_MOTION_BOTH )
----------------------------------------------------------------------------------------
function friendly_ogreseal_flop:Precache( context )
PrecacheResource( "particle", "particles/units/heroes/hero_phantom_assassin/phantom_assassin_crit_impact.vpcf", context )
PrecacheResource( "particle", "particles/creatures/ogre/ogre_melee_smash.vpcf", context )
PrecacheResource( "particle", "particles/creatures/ogre_seal/ogre_seal_warcry.vpcf", context )
end
--------------------------------------------------------------------------------
function friendly_ogreseal_flop:ProcsMagicStick()
return false
end
--------------------------------------------------------------------------------
function friendly_ogreseal_flop:OnAbilityPhaseStart()
if IsServer() then
self:GetCaster():StartGesture( ACT_DOTA_CAST_ABILITY_2 )
end
return true
end
--------------------------------------------------------------------------------
function friendly_ogreseal_flop:OnAbilityPhaseInterrupted()
if IsServer() then
self:GetCaster():RemoveGesture( ACT_DOTA_CAST_ABILITY_2 )
self:GetCaster():RemoveModifierByName( "modifier_techies_suicide_leap_animation" )
end
end
--------------------------------------------------------------------------------
function friendly_ogreseal_flop:OnSpellStart()
if IsServer() then
self.stun_duration = self:GetSpecialValueFor("stun_duration")
local vToTarget = self:GetCursorPosition() - self:GetCaster():GetOrigin()
vToTarget = vToTarget:Normalized()
local vLocation = self:GetCaster():GetOrigin() + vToTarget * 25
local kv =
{
vLocX = vLocation.x,
vLocY = vLocation.y,
vLocZ = vLocation.z
}
self:GetCaster():AddNewModifier( self:GetCaster(), self, "modifier_ogreseal_flop", kv )
EmitSoundOn( "OgreTank.Grunt", self:GetCaster() )
end
end
--------------------------------------------------------------------------------
function friendly_ogreseal_flop:TryToDamage()
if IsServer() then
local radius = self:GetSpecialValueFor( "radius" )
local damage = self:GetSpecialValueFor( "damage" )
local enemies = FindUnitsInRadius( self:GetCaster():GetTeamNumber(), self:GetCaster():GetOrigin(), self:GetCaster(), radius, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC, DOTA_UNIT_TARGET_FLAG_NOT_ANCIENTS, 0, false )
if #enemies > 0 then
for _,enemy in pairs(enemies) do
if enemy ~= nil and enemy:IsNull() == false and ( not enemy:IsMagicImmune() ) and ( not enemy:IsInvulnerable() ) then
local DamageInfo =
{
victim = enemy,
attacker = self:GetCaster(),
ability = self,
damage = damage,
damage_type = DAMAGE_TYPE_PHYSICAL,
}
ApplyDamage( DamageInfo )
if enemy:IsAlive() == false then
local nFXIndex = ParticleManager:CreateParticle( "particles/units/heroes/hero_phantom_assassin/phantom_assassin_crit_impact.vpcf", PATTACH_CUSTOMORIGIN, nil )
ParticleManager:SetParticleControlEnt( nFXIndex, 0, enemy, PATTACH_POINT_FOLLOW, "attach_hitloc", enemy:GetOrigin(), true )
ParticleManager:SetParticleControl( nFXIndex, 1, enemy:GetOrigin() )
ParticleManager:SetParticleControlForward( nFXIndex, 1, -self:GetCaster():GetForwardVector() )
ParticleManager:SetParticleControlEnt( nFXIndex, 10, enemy, PATTACH_ABSORIGIN_FOLLOW, nil, enemy:GetOrigin(), true )
ParticleManager:ReleaseParticleIndex( nFXIndex )
EmitSoundOn( "Dungeon.BloodSplatterImpact", enemy )
else
enemy:AddNewModifier( self:GetCaster(), self, "modifier_stunned", { duration = self.stun_duration } )
end
end
end
end
EmitSoundOnLocationWithCaster( self:GetCaster():GetOrigin(), "OgreTank.GroundSmash", self:GetCaster() )
local nFXIndex = ParticleManager:CreateParticle( "particles/creatures/ogre/ogre_melee_smash.vpcf", PATTACH_WORLDORIGIN, self:GetCaster() )
ParticleManager:SetParticleControl( nFXIndex, 0, self:GetCaster():GetOrigin() )
ParticleManager:SetParticleControl( nFXIndex, 1, Vector( self.radius, self.radius, self.radius ) )
ParticleManager:ReleaseParticleIndex( nFXIndex )
GridNav:DestroyTreesAroundPoint( self:GetCaster():GetOrigin(), radius, false )
end
end
--------------------------------------------------------------------------------

View File

@@ -1,76 +0,0 @@
hellbear_smash = class({})
----------------------------------------------------------------------------------------
function hellbear_smash:Precache( context )
PrecacheResource( "particle", "particles/dark_moon/darkmoon_creep_warning.vpcf", context )
PrecacheResource( "particle", "particles/neutral_fx/ursa_thunderclap.vpcf", context )
end
--------------------------------------------------------------------------------
function hellbear_smash:OnAbilityPhaseStart()
if IsServer() then
self.radius = self:GetSpecialValueFor( "radius" )
self.duration = self:GetSpecialValueFor( "duration" )
self.damage = self:GetSpecialValueFor( "damage" )
self.nPreviewFX = ParticleManager:CreateParticle( "particles/dark_moon/darkmoon_creep_warning.vpcf", PATTACH_ABSORIGIN_FOLLOW, self:GetCaster() )
ParticleManager:SetParticleControlEnt( self.nPreviewFX, 0, self:GetCaster(), PATTACH_ABSORIGIN_FOLLOW, nil, self:GetCaster():GetOrigin(), true )
ParticleManager:SetParticleControl( self.nPreviewFX, 1, Vector( radius, radius, radius ) )
ParticleManager:SetParticleControl( self.nPreviewFX, 15, Vector( 255, 26, 26 ) )
EmitSoundOn( "n_creep_Ursa.Clap", self:GetCaster() )
end
return true
end
--------------------------------------------------------------------------------
function hellbear_smash:OnAbilityPhaseInterrupted()
if IsServer() then
ParticleManager:DestroyParticle( self.nPreviewFX, false )
end
end
--------------------------------------------------------------------------------
function hellbear_smash:GetPlaybackRateOverride()
return 0.5
end
--------------------------------------------------------------------------------
function hellbear_smash:OnSpellStart()
if IsServer() then
ParticleManager:DestroyParticle( self.nPreviewFX, false )
local nFXIndex = ParticleManager:CreateParticle( "particles/neutral_fx/ursa_thunderclap.vpcf", PATTACH_ABSORIGIN, self:GetCaster() )
ParticleManager:SetParticleControl( nFXIndex, 1, Vector( self.radius, self.radius, self.radius ) )
ParticleManager:SetParticleControlEnt( nFXIndex, 2, self:GetCaster(), PATTACH_POINT_FOLLOW, "attach_attack1", self:GetCaster():GetOrigin(), true )
ParticleManager:ReleaseParticleIndex( nFXIndex )
EmitSoundOn( "Hellbear.Smash", self:GetCaster() )
local enemies = FindUnitsInRadius( self:GetCaster():GetTeamNumber(), self:GetCaster():GetOrigin(), nil, self.radius, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC + DOTA_UNIT_TARGET_BUILDING, DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES, FIND_CLOSEST, false )
for _,enemy in pairs( enemies ) do
if enemy ~= nil and enemy:IsInvulnerable() == false then
local damageInfo =
{
victim = enemy,
attacker = self:GetCaster(),
damage = self.damage,
damage_type = DAMAGE_TYPE_MAGICAL,
ability = self,
}
ApplyDamage( damageInfo )
enemy:AddNewModifier( self:GetCaster(), self, "modifier_polar_furbolg_ursa_warrior_thunder_clap", { duration = self.duration } )
end
end
end
end
--------------------------------------------------------------------------------

View File

@@ -1,11 +0,0 @@
huge_brood_passive = class({})
LinkLuaModifier( "modifier_huge_brood_passive", "modifiers/creatures/modifier_huge_brood_passive", LUA_MODIFIER_MOTION_NONE )
-----------------------------------------------------------------------------------------
function huge_brood_passive:GetIntrinsicModifierName()
return "modifier_huge_brood_passive"
end
-----------------------------------------------------------------------------------------

View File

@@ -1,132 +0,0 @@
huge_brood_summon_eggs = class({})
--------------------------------------------------------------------------------
function huge_brood_summon_eggs:Precache( context )
PrecacheResource( "particle", "particles/units/heroes/hero_visage/visage_summon_familiars.vpcf", context )
PrecacheUnitByNameSync( "npc_dota_creature_broodmother_baby_d", context, -1 )
end
--------------------------------------------------------------------------------
function huge_brood_summon_eggs:OnAbilityPhaseStart()
if IsServer() then
self.nPreviewFX = ParticleManager:CreateParticle( "particles/dark_moon/darkmoon_creep_warning.vpcf", PATTACH_ABSORIGIN_FOLLOW, self:GetCaster() )
ParticleManager:SetParticleControlEnt( self.nPreviewFX, 0, self:GetCaster(), PATTACH_ABSORIGIN_FOLLOW, nil, self:GetCaster():GetOrigin(), true )
ParticleManager:SetParticleControl( self.nPreviewFX, 1, Vector( 150, 150, 150 ) )
ParticleManager:SetParticleControl( self.nPreviewFX, 15, Vector( 255, 26, 26 ) )
end
return true
end
--------------------------------------------------------------------------------
function huge_brood_summon_eggs:OnAbilityPhaseInterrupted()
if IsServer() then
ParticleManager:DestroyParticle( self.nPreviewFX, false )
end
end
--------------------------------------------------------------------------------
function huge_brood_summon_eggs:OnSpellStart()
if IsServer() then
ParticleManager:DestroyParticle( self.nPreviewFX, false )
if self.hSummonedUnits == nil then
self.hSummonedUnits = {}
end
self.egg_spawns = self:GetSpecialValueFor( "egg_spawns" )
self.spider_spawns = self:GetSpecialValueFor( "spider_spawns" )
self.max_summoned_units = self:GetSpecialValueFor( "max_summoned_units" )
self.summon_radius = self:GetSpecialValueFor( "summon_radius" )
EmitSoundOn( "Creature.Summon", self:GetCaster() )
for i = 1, self.egg_spawns do
if #self.hSummonedUnits + 1 < self.max_summoned_units then
local nMaxDistance = self.summon_radius
local vSpawnLoc = nil
local nMaxAttempts = 5
local nAttempts = 0
repeat
if nAttempts > nMaxAttempts then
vSpawnLoc = nil
printf( "WARNING - huge_brood_summon_eggs - failed to find valid spawn loc for egg" )
break
end
local vPos = self:GetCaster():GetAbsOrigin() + RandomVector( nMaxDistance )
vSpawnLoc = FindPathablePositionNearby( vPos, 0, 50 )
nAttempts = nAttempts + 1
until ( GameRules.Aghanim:GetCurrentRoom():IsInRoomBounds( vSpawnLoc ) )
if vSpawnLoc == nil then
vSpawnLoc = self:GetCaster():GetAbsOrigin()
end
local hEgg = CreateUnitByName( "npc_dota_spider_sac", vSpawnLoc, true, self:GetCaster(), self:GetCaster(), self:GetCaster():GetTeamNumber() )
if hEgg ~= nil then
table.insert( self.hSummonedUnits, hEgg )
--local vRandomOffset = Vector( RandomInt( -self.summon_radius, self.summon_radius ), RandomInt( -self.summon_radius, self.summon_radius ), 0 )
--local vSpawnPoint = self:GetCaster():GetAbsOrigin() + vRandomOffset
FindClearSpaceForUnit( hEgg, vSpawnLoc, true )
local nFXIndex = ParticleManager:CreateParticle( "particles/units/heroes/hero_visage/visage_summon_familiars.vpcf", PATTACH_CUSTOMORIGIN, self:GetCaster() )
ParticleManager:SetParticleControl( nFXIndex, 0, vSpawnLoc )
ParticleManager:ReleaseParticleIndex( nFXIndex )
end
end
end
for i = 1, self.spider_spawns do
if #self.hSummonedUnits + 1 < self.max_summoned_units then
local nMaxDistance = self.summon_radius
local vSpawnLoc = nil
local nMaxAttempts = 5
local nAttempts = 0
repeat
if nAttempts > nMaxAttempts then
vSpawnLoc = nil
printf( "WARNING - huge_brood_summon_eggs - failed to find valid spawn loc for spider" )
break
end
local vPos = self:GetCaster():GetAbsOrigin() + RandomVector( nMaxDistance )
vSpawnLoc = FindPathablePositionNearby( vPos, 0, 50 )
nAttempts = nAttempts + 1
until ( GameRules.Aghanim:GetCurrentRoom():IsInRoomBounds( vSpawnLoc ) )
if vSpawnLoc == nil then
vSpawnLoc = self:GetCaster():GetAbsOrigin()
end
if vSpawnLoc ~= nil then
local hSummonedSpider = CreateUnitByName( "npc_dota_creature_broodmother_baby_d", vSpawnLoc, true, self:GetCaster(), self:GetCaster(), self:GetCaster():GetTeamNumber() )
if hSummonedSpider ~= nil then
table.insert( self.hSummonedUnits, hSummonedSpider )
hSummonedSpider:SetInitialGoalEntity( self:GetCaster():GetInitialGoalEntity() )
--local vRandomOffset = Vector( RandomInt( -600, 600 ), RandomInt( -600, 600 ), 0 )
--local vSpawnPoint = self:GetCaster():GetAbsOrigin() + vRandomOffset
FindClearSpaceForUnit( hSummonedSpider, vSpawnLoc, true )
local nFXIndex = ParticleManager:CreateParticle( "particles/units/heroes/hero_visage/visage_summon_familiars.vpcf", PATTACH_CUSTOMORIGIN, self:GetCaster() )
ParticleManager:SetParticleControl( nFXIndex, 0, vSpawnLoc )
ParticleManager:ReleaseParticleIndex( nFXIndex )
end
end
end
end
end
end
--------------------------------------------------------------------------------

View File

@@ -1,22 +0,0 @@
huge_broodmother_accrue_children = class({})
LinkLuaModifier( "modifier_huge_broodmother_accrue_children", "modifiers/creatures/modifier_huge_broodmother_accrue_children", LUA_MODIFIER_MOTION_NONE )
LinkLuaModifier( "modifier_huge_broodmother_generate_children_thinker", "modifiers/creatures/modifier_huge_broodmother_generate_children_thinker", LUA_MODIFIER_MOTION_NONE )
----------------------------------------------------------------------------------------
function huge_broodmother_accrue_children:Precache( context )
PrecacheUnitByNameSync( "npc_dota_dummy_caster", context, -1 )
PrecacheResource( "particle", "particles/baby_brood_venom_pool.vpcf", context )
PrecacheUnitByNameSync( "npc_dota_creature_broodmother_baby_d", context, -1 )
end
--------------------------------------------------------------------------------
function huge_broodmother_accrue_children:GetIntrinsicModifierName()
return "modifier_huge_broodmother_accrue_children"
end
--------------------------------------------------------------------------------

Some files were not shown because too many files have changed in this diff Show More