initial commit

This commit is contained in:
2021-10-24 15:36:18 -04:00
commit b9a5a8fe23
11982 changed files with 220468 additions and 0 deletions

8
scripts/custom_net_tables.txt Executable file
View File

@@ -0,0 +1,8 @@
<!-- kv3 encoding:text:version{e21c7f3c-8a33-41c5-9977-a76d3a32aa0d} format:generic:version{7412167c-06e9-4698-aff2-e63eb59037e7} -->
{
custom_net_tables =
[
"TowerListInfo",
"CustomGameInfo",
]
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,204 @@
"DOTAAbilities"
{
"thtd_lily_01_lua"
{
"ID" "9001"
"BaseClass" "ability_lua"
"AbilityTextureName" "touhoutd/thtd_lily_01"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_IMMEDIATE | DOTA_ABILITY_BEHAVIOR_AOE | DOTA_ABILITY_BEHAVIOR_POINT"
"AbilityUnitTargetType" "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_BASIC"
"AbilityUnitTargetTeam" "DOTA_UNIT_TARGET_TEAM_FRIENDLY"
"MaxLevel" "5"
"AbilityCooldown" "1"
"AbilityManaCost" "100"
//"AbilityCastAnimation" "ACT_SPECIAL_ATTACK2" lua技能此条属性无效
// Stats
// ----------------------------------------------------------------
"AbilityCastRange" "1000"
"AOERadius" "%radius"
"ScriptFile" "scripts/vscripts/abilities/ability_lua/lily.lua"
"precache"
{
"particle" "particles/heroes/lily/ability_lily_01_ready.vpcf"
"particle" "particles/heroes/lily/ability_lily_01_a.vpcf"
}
"AbilitySpecial"
{
"01"
{
"var_type" "FIELD_INTEGER"
"radius" "600"
}
"02"
{
"var_type" "FIELD_FLOAT"
"power_factor" "60 120 180 240 300"
}
"03"
{
"var_type" "FIELD_FLOAT"
"effect_tick" "0.5"
}
}
}
"thtd_lily_02_lua"
{
"ID" "9002"
"BaseClass" "ability_lua"
"AbilityTextureName" "touhoutd/thtd_lily_02"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_NO_TARGET | DOTA_ABILITY_BEHAVIOR_IMMEDIATE"
"AbilityUnitTargetType" "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_BASIC"
"AbilityUnitTargetTeam" "DOTA_UNIT_TARGET_TEAM_FRIENDLY"
"AbilityCooldown" "30 15"
// Stats
// ----------------------------------------------------------------
"AbilityManaCost" "0"
"MaxLevel" "2"
"AbilityCastRange" "600 900"
"ScriptFile" "scripts/vscripts/abilities/ability_lua/lily.lua"
"precache"
{
"soundfile" "soundevents/game_sounds_heroes/game_sounds_omniknight.vsndevts"
}
"AbilitySpecial"
{
"01"
{
"var_type" "FIELD_INTEGER"
"radius" "600 900"
}
"02"
{
"var_type" "FIELD_INTEGER"
"duration" "15"
}
"03"
{
"var_type" "FIELD_INTEGER"
"damage_up" "25"
}
}
}
"thtd_nazrin_01_lua"
{
"ID" "9003"
"BaseClass" "ability_lua"
"AbilityTextureName" "touhoutd/thtd_nazrin_01"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_PASSIVE"
// Stats
// ----------------------------------------------------------------
"MaxLevel" "5"
"ScriptFile" "scripts/vscripts/abilities/ability_lua/nazrin.lua"
"AbilitySpecial"
{
"01"
{
"var_type" "FIELD_INTEGER"
"bonus_chance" "50"
}
"02"
{
"var_type" "FIELD_INTEGER"
"bonus_gold" "10 20 40 80 320"
}
"03"
{
"var_type" "FIELD_INTEGER"
"power_percent" "30"
}
}
}
"thtd_mugiyousei_01_lua"
{
"ID" "9006"
"BaseClass" "ability_lua"
"AbilityTextureName" "touhoutd/thtd_mugiyousei_01"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_PASSIVE"
"AbilityUnitDamageType" "DAMAGE_TYPE_MAGICAL"
// Stats
// ----------------------------------------------------------------
"MaxLevel" "1"
"ScriptFile" "scripts/vscripts/abilities/ability_lua/mugiyousei.lua"
"AbilitySpecial"
{
"01"
{
"var_type" "FIELD_INTEGER"
"power_damage" "1"
}
"02"
{
"var_type" "FIELD_FLOAT"
"damage_duration" "5.0"
}
}
}
"thtd_hourainingyou_01_lua"
{
"ID" "9008"
"BaseClass" "ability_lua"
"AbilityTextureName" "touhoutd/thtd_hourainingyou_01"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_PASSIVE"
"AbilityUnitDamageType" "DAMAGE_TYPE_MAGICAL"
// Stats
// ----------------------------------------------------------------
"MaxLevel" "1"
"ScriptFile" "scripts/vscripts/abilities/ability_lua/hourainingyou.lua"
"AbilitySpecial"
{
"01"
{
"var_type" "FIELD_INTEGER"
"power_damage" "1"
}
"02"
{
"var_type" "FIELD_INTEGER"
"chance" "40"
}
"03"
{
"var_type" "FIELD_FLOAT"
"stun_time" "0.5"
}
"04"
{
"var_type" "FIELD_FLOAT"
"lock_time" "2.0"
}
}
}
"thtd_hanadayousei_01_lua"
{
"ID" "9009"
"BaseClass" "ability_lua"
"AbilityTextureName" "touhoutd/thtd_hanadayousei_01"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_PASSIVE"
"AbilityUnitTargetType" "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_BASIC"
"AbilityUnitTargetTeam" "DOTA_UNIT_TARGET_TEAM_ENEMY"
// Stats
// ----------------------------------------------------------------
"MaxLevel" "1"
"ScriptFile" "scripts/vscripts/abilities/ability_lua/hanadayousei.lua"
}
}

File diff suppressed because it is too large Load Diff

206
scripts/npc/ability_table.txt Executable file
View File

@@ -0,0 +1,206 @@
ability_table
{
"1" "C5ACAE43AAE11984974561E7FA59A3A4A50A78D9CFC93FB77D34E6A9005EB8513C936AD583289FA976D9D4B2056DF59D2E3C594C9E8908F69293570D8C9FDA59224D49A1349A8A3E214045BE7EAA42648DC2E984F6FECB837A1FF56ACD6B433847D76D18A6D79F22AFCE62987CB86E6F0AC799B627DE8C8DD2B5CA46AA7BD95"
"2" "F3546FDDDAD6B26475119FEA9AC33C8D59AB3169CF6A13AF2F5211AD753BC4518E6702B40DF4BA37754139415D926D7D3DEABA730D6117565FCEB931C698ABA3CC93DF9B78F667046B210A7A6482A6EDD0B52285772FCB447A50E610748360D50A16AC3F587C3563E7DA53C917FF72EB2FDDB44E153A347D9AE5DE42CF0A2CB"
"3" "CBBF7CF53F1D44631F0A369F78B07FE977F6821307F0BD07D0560222863E2099EC629B2AED76C3578FC125796542F89D17C8C7CB73D2AC4B094677E68146FE4003C8537B1DAC62ABBC9511E3A86192DD909A16E0D0FEDBF27083B76EF90C4212FC1AE97112D6616763CCE9BA56253A4034BFEC16C317D1CACE040F83CCAEDCE"
"4" "5D0E78C72FC80F3216B431398E4FCF6BA66D6A63AE208F5576B4AE1F30F384C1120E3AF4F615143A1FE6BD7BBACB02F21CE8A44F268E68DB0726F6B9642E43CCF0852FD97C19B4A6C352220142AF5741A74AAF57AA83FDABAAAED0E45E15ADDF0E0C709D13E1D0DCD54E4E9E599CA3A8BA11A36D4D07EE4D14C147DBD496E9D"
"5" "FDA3C452B66372F66905F89BE54D551C4A3BA68AD5515526C604A0AFD6DAEA5C267938D10A2BB958B3E9DC8478B5A8D87C467F6F6322A819728D44C90A573906592347E936ECA26EEBA146628A9C35F379F2919809CC58BDCFA954E7A0DE3AF59610B56600C5AC8ADC0D7B17EECDACBF4E25F84E91AF4CC99734C9C58EFED1E"
"6" "6037D9007284B5ACB679A7B5CD801A45DD8165A07434812927ACB90B29F25670656AD0A8DB8E2BC49E6CB3FB987A681EBEFCA45030018E2A5A9F0F5214588715B8B3EEA0269CBE1B35F42D5E151AB38A0A0E1FB268FA5E7C38E6DD47063AEEFB7C8D3E6A6564291EA585337A30A9C932FDAA79800EFCEF971FEDBCA99E7E9D4"
"7" "7C0F541AD1473F4044B77D6D24E403E233E94FFB8E938CE9E72F7A5F97D71AD91E3C72C1EA50993A2FBF6C89F4EEA2F8E7D2837013742290EF2A56EB30AC4BBA867E2D52C606E8B7BB22D02BC849D49EB15226D1C0A9823703031779D047CEB6F1FF107AC616D67F9EF5A8360CE8C77F387202409954F80906A02BE20ACCB3A"
"8" "51F20BA70F8E487FEA07296CFF18D1BFE454892B466FD09A109A241FA235378B8F7D94AFD04A002AF428C0A93C466ECFEC520CED4369DCACA26A7615F8311B19ADC9E096B36CC7A16523F11BC273B558952AC7ABB96BBFC0F733C0657814AE989FC39F6F0978CE27636FA59FD9E9416831CBBA8A9AEAE192E272C86D1B75F6C"
"9" "F9D820B0A053A15AB14728D93BBB6D82AA569F13C406EEF3960F9C0BEAFB1DDCC93DA6BF304242370F371E562DC7005BEB69CC0D201AD18A209B17FC94C871510589F677214FEE263279792982D9CF7DAA1CD5D594E405F337695B038682CB80A8093CC7C33F1CF6213235BBB68EAE478F6CA77200E37F75968DB22574C0920"
"10" "7F39F63BBF3A40077D22E1AEEF37AA1575862BF2DF23ACA20D71AFE05C7BD0EF4237F9CAE198BBF0959C6EDC17ACBA492C81EA028F85566B73E998263F2A39CB9B7811C2F324203751E0B035887A2FBCE71001B539132801284A721914A2A4995E2A794A272E083E62102CCB09811A5B738A638DC521969C7830FC24145BFD0"
"11" "7A37689E620D9212B07568C840EC8200E04E0605EAF7D488FCF1A11E6C5D93D2CA87F554B54A9015C4874D4E9E70BB3DB824C1BA4999685E39F66D8F0D7E6056454B83F1EC215994B27CE1F937385FDD1FB6FF07F7F95F008007E7ED532B6FE217EA42E462E606F5116B2BCF7550BD0F14F7010CFFA77786A50FD8C31EE211D"
"12" "8156F26152BE420AC61F3C913C608DD96A0A9A4A1DB105B5D9C60D5F5581DE80E510FB7BEC55445CA3DB1A37E12E4629E1DFB2B6CFEE2D1681170F00C8C450D4E7B7243E816E0FC0649D44E3B7B4B4A8861B6688301EC0CC0AA683D9FA41A1C5F836797E15ED56B0B314AD5E2B82DCE6FE5F6326CDF52FFA87E3D310F57CF22"
"13" "A3124C7E3BF8696CC295BB14874BA37D18E843D57CB28A32CFCCBA5A265AC5348B405B799AE04A97C812A336880F25965F1FFEFF3E47EA81B5A31436A4761BA50A6772F3F3EEDA204AFBCB4114D2A8145CB1F72CD054074620B3429259304205E2079D563119D56CAA5AAC9EAC1B05DCD62895EA3FC8A24F9EBA5326A02A38D"
"14" "3C83A03A746F7D8EE8EE0B553946847BBD717D05532C4E965F685FB5166C10BD0B5B928F698AF6ED67A1C9ADE735CB87E12257075EF14EA0B552E15ED8435E9115A1F2C04166F7B784F30542A257C743A10231D8340A85A9836DD57C4E98BA5C865DEA2D9513E335340B5FD3D9ED55F0F1A3C2886033FB1243382451E9BF452"
"15" "63010DD173F383218420423B5520A8A513CF3A23E8FD2F3B8499E6F2D411BA34EA9DB485D46A569609C30FF6F4B02FF252134B07F610BBE9E21DA3F5B9078C68EC0DB9097A80625B2A005E1798C210E9F58A4606A4D87F86F792B5D5A11FB459E0FC09F2471BB14E7BCEE7A61BD094BA8311A3F8414D064F0303727EACA6AB5"
"16" "0B9F85792F7D589A3CFF4566ABEF891EFAD586628092E8DB9E0CEB422B21FB4BACA2D5D882552C725EBFD9E799CB84937BFCEAF939AAF0DEBCB1B711EA30EAE75891DD845964135052F209D682FE371A14D09E0717F58552ADA0ECEECA54F4196703CC5F1DC29D913AF835054456CF9B4B013C2D15F157D5C590DC932DECAE7"
"17" "D45FAF0242D111F7EC20BF7932CB11A8DB557DB1C438ACB00496D56F86882AC42F59E30D83A589B8CDB544166A6AACB10C71F095514AE24BAA770465F4A2165F46D44767C6BD46BA4152F81A1D959A17E84799DA910C315AC064FF1F0190F6F6F3DE0DDB3C7F3BF97DA5F0480314C89854FCE1823452C106B842D8785A3C31C"
"18" "F62B81923638C42C0368EEEC4666BA07DB1B13FDACE38652EE725069171A64DF6A424C12B83F313B9A2B09F1A73E631CB8BDFDBDF4C9C92C2540FD09C9245D92C10660D72835B227DEEEFC08B4AB10A2F3F9D74DB4B6B4B45350B825FEA19C1E1741619F4DC78217AB742B3ACDCDD7B458AA47969AF721C092E59BD2A2F76D8"
"19" "B2BA58A62635474267B952B840BFB80FB03C4283605A33DCC1A4505B5E0B765438340392E8DD57569622C6F44BE40DFA06CA054A341695B247BD8C6387153493D170F17B281F14E0C85990A45266738D820A58C04087DEEC62519F3725B4B73BC2E0083FE8EB8585D202C7EBE2ADD63C02EB2B01FB11A51987D7DF1F086DC37"
"20" "CEC2B5A58B8386A75DBF166685CF48615AE384014BBED8334A811D601AC13E57A5FE328CF56400D80DA6041F061005DB3C81FDA39504A2665D5B36994F44ECC73EFFA9E06F63A175F78C875ED5032AD63A433D653567627E8C1EA27C57F9B68A634EB69F0C1CEF11B029DBA7CA22D29BD240D3BED89239D65B8AD413EF91FF2"
"21" "579E8A384B9CD4773D335CDF4C6BBD64D412730A51BCAF79C8C721284E64004CA55F7A9698823E2DC065EA91B402EB00096DE8A5BE3730C72A56593352D332FD53E883AF2C4C3D6F24095D8A422723CC812BB3B00F9E59ECC8D14F61D2286CE4FFAA46A0158109031E9679860BB34973D8C152E79D546957BBCEE88DD6D0C71"
"22" "F1E563C19E5D4E1DA30918451332FC69B9A7CF89EDF78DDF7B42BD1C2839E927C7E34A3EA95CDB3735001F01AAB3A538D847B92B7E36FB58E8877DF716354A3D8B2AB66095B5A19ECF923FF75331D18D443944802101768206B2B5380942C602FD1902327B03A1CD01F1B81CCD31AE01005FA0AA36A6F50C73DF513BFE49701"
"23" "E6AA03821C7BE7EE85D325879F5FC432455E5A7D03692B7D3408540316E4AFD8AA2647A95474209D7E6408D9E05586D5CA423A14FE9056842388CA16EC5F8812BB4C7F5A85E2C7F325BCA9E9FEFBC6DB64BD54120118FEB0107DDF68E6B4388AFCCA61CF7DE1FAA1027A0952ACF8A891D7328FC430E95DBE15E484B96DB8779"
"24" "34BCF1E0BBD1AE9DBDE647AEBFEC01E708A57F9FA5DA76E0F6541272F4CB0B89CA06053F3133558A12262AE14E3AC69D10E716466520E3FE050CFA83A19B2B96CC6DB5F2CADCADC07EFAC8228FAFCD82D3B3D4949527FA0DE362D9EF1A1BDDD8E5664057F68FE2D0DDFC6557552C23D1CDC7519B80B327F6345752392F37E37"
"25" "1405F6BCA40CB11E8851C9722DDC2D37F5EE009321F3962DD496B9DCA7D55BCDB5DFD76641F4EA9492FBF2AA9773FF13412C240CCE0AFB2266C4D175E1400A5D1C2E6A21088B9DDFA945F4B3021C56D641F423BFCB4520EA110324156772B559E453D102D1A960778DA6C9D832639D4BA2D25CA31EA7D4CA34AAF1B116242FB"
"26" "A310CA7498F76EE29CA01D07A3C75EA25606EFEF3D13F586C2D6BBB934BFD25F7E206C63AC8849C68204258ADAB9CA22141DDE9B7DECA14CBA0A5456676F4B8108F248245C1FC357CE697BF5EA8564E58D916CB7C5A066677EBFAA402AB19A9BE074DFE1DF65054984E187CE759EBD6CE4020B967889C49776AE44A9AA5D741"
"27" "F20BD798CE3998B4844D87C23B43BB49B655D86A8AE8CB7F204C1E09B04B139DC742185A2FA54FDF4ACD1A4FE0A53CA283ADFA7982D5134A62AE9E83B5D320CB7833500D76C5DF2AE8AE5DB92ECC9B4E8D41364B0AF309E8DF5B89A1A53D8C879E6EEA89CB1FDB51C201D8B54D63B75025CEF241A61C8FC4C0E0469702AFC28"
"28" "9C729CB7C12FAC2E4449D0319490D76C2D8AA8B985DBF4D1E97DE8229B567FFFF1152C2CA9FBD01D890BD949B65DC2FCF66A2D87B49631D0E0B2FCBE13ACCB233B7CE6B64257A5EF1C71ACB5A42B44AFC09C55644289D41B670443C3329D8CFFAE5F6FC2CBB4104B4E29CAB3551208DA92FBCF9A3DA7D6463B42CFA35C04337"
"29" "03A9B10318F1FC7999C6AD3614229B3F971445E2CB6D4BE91CDCEE93F472525DE2D1A75695AAB9F1627C2B9DEA4004BA39CFB0E868FA8995856DAF6419ABD612FAF941F34F1C2FB18FE2E2A0C789482E4EC6D81A378DE675DEB09D7EA291948D4B37DF1796CDB7049F2BD58B47330706FEAB60E226F171CB931715D0DB8911F"
"30" "0BEB7CF215983ED16B548697C9D18A0472858A622D7B46E8AB8688656A7229C99F12A30C463C74041BE65E6E27320EAC17647022A0A4C54E76C0E9DCE1FD4229D565B0FDDC36AC5B960FB64CCE5754339AF6435C8D004C0D8DEE7EBDD97734C0EFCD78457035994D9AAF2ECF4500A26038C9312F03425359CE348E6709CE2DF"
"31" "171F15307B220D57D58D4317EE8F93F9E0B972224DF4ADB68D713FCE1D431884B924A1AF1015B35FAB3ADB56B6C45A9E5329DD2971857FFCA7ED5A3E9CB8B6BFB132C6648119AAE2A6AC6BF4448C1F466563568436501C3DF27D392229BB8AD0CAFF763B3EAA135770658427395AE13FCF919F6FF4D675D47B2715CF1FB8183"
"32" "1AFE740A02619A067E4282E96D0D3EECC3D8300F7CE5A8552CCB6E8A61A29A8AF071931AE33C32199596D74943738089AFD1343A17710C0C25319CA7D8472AE31A0CE8FA83E6A0BD931034E70B730A6293381732976908203FA72B56A77BD0D6C37358CB287555C3E63EC2B9355E5E8CC40C5D94B73304C2FC2EF2E9C5C3667"
"33" "CDDDE31CEF6A2D479C8B8E682E40E4E0E345A32E15C7D765CE8296C8F5CF854F4E92957B133F62ACC752F7207A65D94102CBA403FD2EBF88D6513DFE6A47ACC1E896D8610C9E02F82CD0BBB09221972F0ACBB58E4A4CDCC2C19DE6E4B06FBB051972C715C621340C8F078842309A411A913885E7D7C5E578D20209D6B0A1269"
"34" "B1899C2FFB79BE01B81C7CB145C34C4DCBAA58C26DDA8A3D1477B0B343F20A9BEA2E085FCF008B944D259513586A3A02796B98B39B2D00AB45BFCED147A80844295086A66F0D24524BFF492EA389EBB026777E3307569876565F285FD3F5CA79F76599196B2F01F24192780A923D8C610E4C27E26ECEE0F14DFAD524A134086"
"35" "E53E59DF68D36B125D855E09F27CB5BC47B107A28ACA0D081ABD8303F36BBDD373C66288CB86DBC18890F6DDAB376C7036885D840D849C7E2B4711119415A8B05DFB552DC578B68A812117EC5B5B71E6B828A422031B5FC3481B92B55114C544852E2FEAD5C5B33D3778DEFA49F5F38D5B7EF4FD4B8B00E6031961AA93BEFF8"
"36" "ED779D5187101AD9A6E96B51DB6306FC51C60771E65AD2F4969DBBBDBB287754F8DD71AE1484FBF5CE9ED8262638CEB44520BED4C9974E9C388B66DEAFE2DD513EA85578A88BE288DA3198DB862C436C37C05B94D298E3A1985A0714F39801A9790EA0E3E4E5FC3A6B6FE7686C86D36BED11174A1FB350828FE82E7256EEA08"
"37" "1736CFB4FE8080D80EB0529FC470B248268B148B6AAF0BB45F4AF566CD2AEC26BA764F3BC921D0936AC357346B52E63F7B05E78C7A461BAE628041EEA12B84208771BDA9C7EB064EFD39647D8DAC9CB7B30E4BBA14296508D97872E4F2E948E692AB52CA5CED147F69729657F742685487F4C0378980A5A01BF4A8330BD6466"
"38" "241B8DE18475865D44970E1E08BFFA0E76CFAD22944252E6618850DA4596C771CCC036F5D1D6E1F5A3315642C95D3516E14BA0886E9EDFB42CE8308F3ED37310F658DA14473AD797B33F590609D37739E952AD48357A35F29C1D742417A302A9FFE6DA471F345723BB73F1A9B05C7B5C1C36D28F461BDA52A9A353D46E4301D"
"39" "9C786E1B36EA8F756A8C8C1D3B2EB8BF8DABD5A790C2BB6B52FF431681A4AF6DB10C896EB5D859AE9BD9700F9429DDE6B99EE9C4FC1B46D3890437A7ED2811206B9EB99D6CF0C7616567E7B574432CD89E5E10F8869E3EEA41E5B61AC75DA2C70F42A135DD8152E58ABC8D77645098DC8F0C1BC4CCF424ABA85CDB7F93EAD8A"
"40" "F4C601C0202477083F5121D580AE121E149CC1D6ED02608A032C7B65F08CBFC0F684019AFEF6D14137E4D1E8EFB91ED2EF6AAB52E36A2820DB80B374207E066928D133733518AE1182956CED01D6A2EFA8EFF98A3C37C87B1C9BC030CEA5D4E2849997FD7DEBED99D45ECB59CDDDE9C119FFDFFD7B710111967CF333720B053"
"41" "85245591AFCB2BBAB56947146C35BCD820C41DDB5FAA780C0FDC9E96D8526CAC170D19DF71E81FD074D322365E4ED79A18D436FE3FBBE567F132AB43297E3CC4FDF057B117C8307C18CAA0D4D0B1F94B9A9C01BF288D2CE97EFBA80EC96A845634FBCD9F9AB4CDF47002FE7B538A2653CF20D61FF09863F203DE99AFB072277"
"42" "36B1307A50BE03D5EC3E26753FEB3865BDCED9A42282B1EE9D75590A273B5B5E0954E56B572E9C874D3BABC54160E9ED8B3F63515B3324269061A7132A2A8EEA705756B7056B285B9D9E0EA2A21EC89A896F1D5FA9557119B82B170278C0636292D032A09F1096777F95FB770D0E875965D7A37188687B2BD3AE5C5D83DBD80"
"43" "0510B7C0BF8E31DA27D9931C1A0136DBEE40FF53F814C898124212E43E17F08A0FE8872D3520E3A52BEE10E8FF1A40B8558C4B1F5A91F0269982B7EDB3E78741422006F74070DB6073263DAAEDBEF7BC0A3FA35F2A277933FCFAE61D2608C6FEB359CD0D5F7C473BB8CDCB152E56C76C91C3A4302322365B75B2B835F4743D7"
"44" "26F4B24C78E8ADA9DE49A62D9AC88128517C20BAF1E6988B14E95D94A5D440D1453AE12FC9203C273EFFAA86C5F0201A8457946099357A42AB16BAC50CFF0D30D52FE0AE33323423CC4A4C60CA64FF58E8576147F24BFAD22EE37BFA2780DC503CF49088AB92B69AFE9EF549D9F20D14F72EEF615A6A39D2838D32BE65E6519"
"45" "921FFEA99305113429539F004344B46BF0AF79148A0499892C25213B6550BA9186674F1B09D992670AFA095AD3DE4A310BD744BA0122741AFF24BE2C46ED16EEB8FDBB76DA157EE2E12715791023D134609DAD410C5306BB0EC83E1B271C043FFC3F441DC36A3308C0A168D22D92D3245EBDB1BB5F91A68190AAA0A1BEA271B"
"46" "77C7E9F12614882A9C40082DBF4F9D40FC033546E09840E8F11B6FB18E9FC1BE01BAC753CB8B07B4276257CB3F5D2F2900BD5A536891ED720490701A7347361555470C66F8D7451AF4C9E8A2B7B8914775103491625FB7A6BFA040B178BD2A1BF3A7C8E2BC914580F97EF4BB982998B391A95FA6F65D141F03434631E9D2D2C"
"47" "EBEA4A98C5F08B0809739855DD6BCA01CDB4C7E5A5BED03929E462BBEE6B69FABAE5B306995F9887F090B53DD83D3228F0042793ACBD07E579088B893671E7AFD9EF4025C06484A1E815270323465CAB128EAAFFB500E25F1ECAF04E0183FFF7A8F63E4232EF344D70FC1ECFDF364CBA9FABCA3AE6F5C7D6B7D24436F964BFE"
"48" "2B0ABAA2240E03ABA918592EC695A45F8ED8616886A8622A71A7C35DB2EB4C2026466570C8F60206ECE4BD7110F81ADCED4966FBBE77AF471C7C8ADDB76364E680FC7C49D479C4C0C3678AE4B3A337BA0F623CE4A943658C42F6F4B5B42544F6531077512E712B60A8096B7238C10B243EF7A6B74F30CFAC3BE3A75DC6B182B"
"49" "267999083F98D4FC5AEA76B6BA6047A903DB284864DC205C6A237830FDF84691EB22593ADEA46DE7E40DA125501DCA1843DC2164A9E5AD9A1E6905929181ABE2B85439F3371E57AC7C9965B960CF76D14B3E21E72F1AF90FED5001416795C022064EB6751F00224008794CCB9C5B47292001679DDE1C6C0478E36B9FBA73F2C"
"50" "31EA24D32BF89487C9029C1169452A5CB86C57D2DCFC723C0BF1090120CF738F65F736499A721EDFEBFC0525904CE3D66BA0B1109232E261B94F6848234988086BBC2575EE2C6B536C4D3C349396F007ED1496B029CE4AC0EC1BAA3F04634CB9B5CC768C172F5C886B83FFDD6C23BE916D0AE34D83D10D501D7DB97D1F4532F"
"51" "90B33126469393EB7B2DAF3E8ED9D26232E37F02BD564E4F30BFACC26CB68E0550D1ADE4CB10D0CEE7FF66D9894AE53A829C7E566B04165A49BDA86861396520065253523BA0CF03FCC61917E6A883099DAE7E53242D2B2EC01AC3BA2EE81E08E34AC2281A02C56C28194CDDDEB7EB4CAECBCC1490B7FD81D038EBF6C3CC071"
"52" "C6428ABB9C772C04E255FAECF2002AF8C40ACE5879C311C2E48D7691390D570BB42A8CD159EE2210D0D78A0FFED35E72897730015706C65AB5D2941D866BE0C56A5158F86C45330CF61213B4F1B88CD7645276E7D29166FF80E60F35759CC7769220F195B278BC8DDE72BB522A94B2E6E0EF7544FF8596F7F38BB7BD9EFD713"
"53" "EB9BF508D9AD17C0BAA09331AFC6E295EE0F91FE75AE2A8557FE3EC72AC09A7FDB574A235D203EE49093C2C1E33676A2A7A0A2A51D87305330487AAAAF25AFA8882789B519319021B280B381355DB936CBAC0DAD09889B7AD8AA179E46933AF879041195F79A513AE33EDEB15F733641CFEA85622A421F4578CE7EE028FADCE"
"54" "94BF7991B23AD8EDABE481DC0F080E6740154C349C965C5A2147EF6680298C1462F5621D487D26831CF2CA8C03757D40B9BEF53EB889B45985D326329B1BBABBDF656750802318E5B066AEB8D9291675DBDAF36D8C496EE52E0599B0F02AE6F27139CAF8C495687FBD75159BD83F7CDC7DA67FC90E87C0646DD67B122E93E9C"
"55" "2D68AB40C39F943D4A3FC5688433A28CEF71C41EB89D952C4E83C6AA66E2846902A51A6F3F319AB863EEFF8ADC05C25AD4C00CA9DE4A8BDD9F28763D1045DAD3FD658268A94402CDE00FA1725678B8939A00FFE8C975E95B869BD5072857D81FE8192A51A5152DA33C09E25218353C6341319D9C95F9372A56E71DAFDC2D88E"
"56" "45EDD86AE9BF611A7E438BB2A8280D2E45017C6133F18C07C532FCD7DFAC91CD5EAD460AD9F89EB346864CCBF050F690744295269F77EA6D5503462FB1B8367B2C9770EC98C77ABD9F4F84F8D02319D33D8B08C6572F1893148FCF3EDA1991453D53AB2A04A0BB8BD9F7AE1CCE752B2D8EE2AC46CA4CD30C5838B966BB26DDD"
"57" "20EC7009FB8EBF26FA4BE5E2F401D38902060604984580EC3FB0067765A5DC0582B7B916D947ACECC566BCF549F5A245C72D8AB1BF96F91ED2B3E88AF722EE5031B810A7A2C70F22DB7B4067415199910EE1531095F25E3366FE865A3371CE1C6BC85DE28EEE9C7EC3B34A6D572E39D44FD93797FDF5AFF42E4CA88F12B546F"
"58" "8596C336B565D5B8E9D644383712E15EB2CD2E8FA59C700D048592364C80E288EFF586B3751F626D4A3EA5CB0A3D4F18E52D11998DFCF5AEF23EEE14F72B8FBFCAF7BD291B5FD76A64314DC5085B5DCC5912A1BABF3FF66D27E28743458E18FD4A3117E94232E839D71248353DF657B92FD61D639ADC9F900F717839AB32F93"
"59" "C1B4D30A10C07BE177579BBD85BE1AFC5094C9ADA221C493F0655E83599B604EEEC7B6A5EAFBA3A92D9C408AEE44DB7DB49A811C678EADD4F72AEB2BCCF6428C6DD7AB154A6FB8DC46FDD5FF7B2A41793340BC8174FC42943822C6390D8DEC2829BF0819AC5EA51B83AA84AA97B917B19CA1ACEB889D4B2412D9C0DBE98EF96"
"60" "C6CA401B5B96BD4B86D094D5E86309F90553A0142063B6FCF22E1A486EB168B4DB75D047F1E220533902E28D71870ADC0FBF0A341199C3950546A26F59ECD2B934D3238FFA7B3CF60F353DBD2E164C9B1B171F092A2BF1976E62E906E730289BE697C3FD8AD6FE2F26EC7E0BA4D89DD3643E990CB58C2E0F02F85242A725B69"
"61" "5062A387B0AD70CA2A0C3F78C7FDAE9713ABC97A367C7133E44032205339E403CA228846CA9A49E119A091BBA427CAF2742A7ECC2CF0CE54F07D279F8BFFAF3D3EB579658350EE0846F38CAC17432ADD16324A720F7A011FB9E59529F8892DEC43CB6341E07AE0A48F5B5D34B60129018CB4D4BA227A7477C7D35FD148C5C45"
"62" "79F2C7F5DC5EC9FF489EE1A5320D96C011C25ACE2958678606F179A3BCCA70831AE3D11A43E1F86D2EA8ACC9DE08A43F14388AA173FD31347353DF65A32D4E65FB4BE5C233BE6467DC3FC74E6F5BC254B0082CAAF6B915AEE63EB7985510569D7E17B4389860E6409D250E1CBF15A0B82FDB8FBD344F90E69027A7CBB23E70D"
"63" "D396EB24BD7A00EA55B4AA1553E1618D6F9456B07BC40049EBF5ABB98A0BA3D584BD92CE9701E4964CAA33E12355A76E8CA8C3DFC6A381D5B038C20200C1E983F4ACD6B39E0D0D59B279B2AB6FE655C387B99F701896C91393128397FA2316963323DD3CC229DB111911AED01D8D18F323491A14EB41CA3F7CD664D0527797B"
"64" "F16E7E406261C0F936512F4DE032F8D52264AC53F5D2E52BC169EEB218778E84C68F091105E070055EB8E1895D04B51DE6935C92FC095770554F3A628518058663746262AAA4A050C55DF61F74891758C33E479C75998F39A0E0B033F4185D14AFFCA44F968A2430992C7CD93B1F2EA52AE55875119B8CC60AA4678868F2A7E"
"65" "413FB8518BFC50928265DE99D66CEBB6D759F321FF2F15E9E38FD13C4D945850F97844B88AE9C4CC34E0EDDE74BD7A6F7461CB7D37C80674C8E0A74C78AF5AD6F9227A826FE5CBCB8B6F0E5220192665E7F41C7CE30514A13B7AB1EB5367EB789967843F122C66AE0CD80ECE51BAEF0F30E1C67C993881F404D6C97627901D7"
"66" "AAA4385B2669FC1FC414A9FEBBFD8830A6F26F3461114D4FADE23F34F9553FC9004A95F4446D1980E594B0A3E6EE33A6CCD9325BA8190D48D5853DFBEC8D8537F19FE406DF9FAC87A2A86EC9DE5A3DC0AAE4630F94722DC6091C448A4939EE582915CBA0F0D3FF7EC9EBD8CE8C033CAB67E7C2E2CD6A00801AA3EC572759DE2"
"67" "3D026FF633F4F4E9150F008B73D4C406E4B0E1C58FE237C4EDCD66B9CB73C99C1B54D9D447E3990E67F0643841844F7622453918B3C0472134720926810096094F4F4C81C62B240BB9641050743647A4F948BF233977F42CC61ABCC7B428B354E1DEDDB6939A6518FA5727F8C401D5FFF726F99E0D9C7AEC64DE4310FD370AD"
"68" "12F2D89BFD77BB0EA023373565CEFA67EA6794C74275A9E6CBFA06F031FB7FE42AB757C86534B1753BB1334112E7B131CBDD0B45C3C47CA22488BE2128D51C8C3BB96277CF3C162C9E0702D91D29DB96ABE94B34BB4B6924A849517326FC1C0DA33567C0EA20D3065124CD4910FAD75844AA276052A2A5F945568877F47B475"
"69" "E57FBA625CF396CA2DEFDC160C72F87DFE3D0AD6D2160712B40C3620E085B8092433152A382CD9338CA719DF38D6F6EBB570E9677CF5F763A07ECC04406525DEDF022FD1295CC07B96796B0BD6FC5FA2F0625D41D3545C41C18679A5D36BE5667BAD6484AED608C8991F564B4E8DA9182E3C2703682167DC9D616CFFB53CE9A"
"70" "698BACA970A5F5E13A7AF404EB34A97C067625F8AC5F49F706885EE1D3733CCBDE744D02865FA4062432668B1C60CCF8E1C57C50C4A79757A1F31B0A99B3ECBB5996C7A1D048F4B3CD69F3DD2D1B2EC02F86FDFA867CFA725D378930180E1EB5ECA2E82E8F1EE47FB5BFA081F4F5CB6EC61171E1471F745602A261A61363FC7"
"71" "F0B68719486A429235DDEDC2F7F87FF727FF775831B0BD924CA3279A3FC79DC40B576B26058F1C38E72F07D6B3E9D0CBB485F7223DFC39AB2201C4CB182FDF6F0280FA2EB65AD5731F607A18BFB24384C3AE5010C3ED328FB5C468B8E6684F8A104E58CD0DEA87EDAE4D1D917E05CBFDBB8FD36D948A018B43F4DE30D0626C0"
"72" "06CFA4D90030F83BED5E7FC9D4262FE3F6EE0E26ACA36D5EEE6FDA3D389B4D42F907DB68954670553351C1AF8C98CE1E51861028B4280E8B3EEBF4EE1CCFE83CAB149053DD36EEFFBE7207D5E439E55AAF69BF3EBFDD047A062443FC61C319B00B7E9E35C797E578E0AB067BFFAEA94227EACBA840365A0F15EDBDA2A98B9BB"
"73" "0E5CE61FEA3F1AFCC917E7A55F2325F8340580EE4B3444C3708174808A77119ACE08C40517A28EE468CF99D5EE714789B0B6B8530C985B0485C6BA35A519533361AE98C1AAEEC418E748DE90EF1412AFEA4368D295CD943FE7F58B83A6521C3F68D1BFF60B292AEAAF57BB6DB2643E8A28E92788D123F43C4E46573BD55CF64"
"74" "B7D90DD885BE7919EFA0CE9DDAF3654C2150DAF50778E6146B7E38DF0FEA27E0062041C897A1459CC25A40C5441253306F160E6010156D7963B571A75472E76FD59D98DC0BC03E2229BF7D4461C9B1DB10DE20AED7509501CDF3CB9B8469AD83F3C25E710BE7E1CAEC14B9B1B31CF343EB1FFDD4273E8E51F328FC5E8F05F75"
"75" "DAF0CB97FFBC3E59580B776F7A34C89891C595E8A279154B19660349DD39EC2E2CC4C391613F54C0878604212F4A491EED8456AA3DEB96CB54D43DA8C72EA5DA8EA7344BB730E9B774F8954EEE9AF428EEE6CD719E74389379D4E446764DD253A6C93DD1440D8C3A46A6226CE76EB14E40CDE1DEB61AE331C4484476C94487B"
"76" "4C24188128873CC68903A1EB7F1FCB3FAF550EA7C4E13C2C604C961871DF78F8CC3818B612384A342B5F83C32E5D57DB74B68A1F091471F93C970C6131F7D4C72845440887C456C1478A62A7C06C946AD92C9A1E56E3594DED5C789147DFA588837D23FA2AC574C65C6C4AB40C412DAAA7706C0E1BA23DC89AC0223DD3EEAFB"
"77" "AC2F215323B298516F680B873E7412B24D17715ECAA12F08741C0D4D3E711F99FC515B038C86FED64D9E3C52C9B557A51D7E0A5ED2C612F0910C2EA0A1924723398EBCCF5072D2B5F6BB4533BCD7B6943A8713A6E9F2C7A5817C71CA2420CE621AFEE194FD0C97E4BBD35C0A33F53C820884884DFA41C4F9B1BACE648FEC7FC"
"78" "388FF4AA7F181E338B7D49FA5FC01D9FACBD2A78647F4E1C782D8E2DBA05188D8C8B9131025F67B91EBB4243FDC58C08A06C547A8D64FF0C4AB0406E93D47D5B02AF3E1CBC237C71ECD7D49EBC315D5E7264FABF9F986D24E3DD953312FA05811EBCCCA60A5FA49442C4A59ECC8B65F1AD4BE4DE91BCEA6A24A043CB237E5FC"
"79" "4B23505265B540DB30205451CDB7E32DA721AE757F4BA127CA324A872F88B605F07408A3FB46848C087F3A1B1FEA56B3F6A07521B2270BE32BD64C9206EDA018C291B81A9BE770C82555024712F50B03A29B12CE1B8481D0981BC6E1ABA9CF6E7295CC10234DFDAAC4F3A9B2D59523E423A9F7BCEDF65C5836504BCC59D3F3C"
"80" "1375AD91DEC6EABFFE68D8D126F87E21D5EFB4F5E19B9AC95EF5DFD2159AE2A169EEF77CFE0D90251CC4531C4259AA87789BCA872F316A5AB89729CF48C361BAEC1344B9CD557F4DC6CF223B5809825A34BD093E415B5618ED1B99D01D922A8272F945D01E734E093FC85E3E79E6FA87C5B90D46B5F106020AEC18C6A5AA961"
"81" "92C46EF5491137916E259A6F020A425865B3EF624C5E6DF3C498DF14D81A2E70BA3C52FCA8FECCEA661BA3A5919C1BB846BAB575E6C606EC2A5B816C91E4A7130EBB31FBC7B7767DA7A578DA046C21156C46B9A44F794F863971C9BD597A4F666B2B68A1C5B2D1FF0ED9055C995BF8C9BA6DD3AF4FB36E9CFA1CA16F015E406"
"82" "D3BB5F53D90297B8C6FBBA8407F2646971F000458D8B2159F085F5CE76CB5CFD39D4228B34F0548AA788CF18FA33C27776DAE98037D1A56A22A8446B55C21309133A435E794D3C5279D46C4FED3A3374D2DAF962DD9991ECB8759C0DEA28FF66A459262F1D114538305B3057705E63B1C44E18D1B1623C85B450E249FB0438A"
"83" "5C9945204E4EFAEA818ED1542B7D23DB8439FB879255AA3C711FFD888D3D21D72D96B837228CFD7868522366ECC16FDEACFB59FA18FC40A01F1B2E8634595EE1DB31604C14A9A1B3BFD1A9D69ACDCF13793E15DEA7B51D6C9448EB74F251148A278029389732450EF732E788CD1FBC7E6E2676CFF154BA57423F80FDDB9E42B"
"84" "76C66715380E1A3994B546C7D9F8F2486845124AFB05640E37A393EA314A635560CE925667670D0BD9E888E4ADEC246B191F4711F64B0007FB06D6D777D2BEF8FDE50920FF04E8AFD4E0DBA96003A1092FC0249EEDC94BBD9B01332C2209196B512EF0A38793072B30CB217E33D271713AE7C867E9AAEA861376D25B253FB13"
"85" "C1CA0A826A06A84E0AE496C6BB2416AB054BDA35AABC7D9B01940523C5E347C78B082EA5A2FC104D0F61C4FB05659AB0159BE9E89953460F02A9C1AFD939DDCBC21F1FBCE137CEBFFD09C6ABACA376EEBC7DB53BC3E2A6FC257F6A4E2736B8D50B5626A8B0624F9423AFDD3D3186A648C7780299CF2B91C48B21CCFD226A480"
"86" "067C1DBF1DEE73B08F76F4DCFD57D52DDBCE78B962BFED2AD2AEEBA54BA9362AC9F44A7F11C3DF153E1403BB47F16A1EF846282F5E8B8BDE548D5196E626EA2DF1C950175DC7191DCD9B97642CC2436E4CDB1F68215C40DA97FBF9F077B19763326EF1863E0ADEB0329186ECA98E46DB9C49D9B2A8C5E172EB21E98B3AA58F1"
"87" "BDE7C96B8EEA7593FAF84F6483C4984FCB576CA91FBE13FBF262BD7375399FED02DAB3ABF8DB01ED5B592F57FD8DCB39A388855B09F8EF5DF55F7E6945A32E12DEA33EFB72A47BAAEA7241ADCD647474FD1B0661D7B7284C45D893621DC1856105C0EA5B27BAADF15DCE50EFECF9ED1CECC93F28540EE840BDB13EABFF71A4B"
"88" "CC1C23F3FF6C52A605988C77D7FECAAEEF0B51FD7B5C35BFE4BC0BA40D29F3BB5E219A4819C7E2E9CEDD465EDE8B67CDCF30F73A93E4C82960F8BB5BC9A15CCD666D6D8721540C4A4D0B1F428A0D282BB3D23AF27E61976A72EF722D163C2A44EED12B6AC731D4FAC691572B196A764F56A66F2B7933D07A7F64244C1185711"
"89" "139988034CD1EA0AC3D5790BF17C6D85AA60E7477817A43422A8E5696B3DF608F3BD8D302713BE098AA91C08F3F9ABA95D28EBF0F8D20FFF8871F5BCDA471D63A6B5CA7BA5590E84D96FA15F82F56BABC78660DE6058E131E54FF02458B9A46F48F31F0AD06371BEA9143E1E91361AFF91869A221069A9BAA7B786265E3ECCC"
"90" "C4449674F4893FC87B9A34E2AD5032B804F697D2BE507842FAEB04A1A52F4A4585FE24DE1AD43A83EA6BBE233C608B670A23D6A72CE7E8FF85A482E3BB2FADD30F5EF561693838495534C96FE4F119EE24F6E30D8C50E0929392ED6C7E3C78BD58879932EFC8A7D0DB8FE1E23C9C0EAA12EA051787DB94FD3131C3969FAC493"
"91" "8AC38F44E4EB5663770260DA004709AB80999B5DDC2B7E2B7636D29F76B5E1A90F1A89D8EBBA1C3B5A6722A1C17365968AD33DA61E387B126E80028162807AC26DC2BC3A9C3AB112FCDA02325022EADF0CD0EF6728B22C242C2EAC5F961180B52C98AF2EC9856CAFA362CD13940A28D0AD24E58AEA9EBBF3F9E3686E751FA5F"
"92" "7AC0CF0F82F290433DED06840BDC898F64CC42BB4467091BA5D1427A074B2308C21E8603D6967E294501E2337FB688980B965206609B480E2A2EC3A1EB71367533D4AD5B4C0C05A1CC2AE0A07A243944B7366CE05887520D76FE73E507D4FBDF56C91AA6AAA637B414AAF524E741399DCC96F3E92E4CA35E5BC9A1B033605A2"
"93" "77246A85DA71EB7B25C1455C4F50E47B6D005F9740F5DE5EF8EA8A5F2771F8689B3BB120188FCCE6F275F3A0073005BE663FDDE5272D769E6B377F2DD16482274FFCC3FEEB61A0467B219D9DBE6B9A0DB54C34FF880940F5879F33D6C487DBC000323826EF1C841DBA0A8C589A582B614418DEF92E6A5C9BC5477FF48724D8D"
"94" "54E66F235B90AA30A83F0CAA98F428E8484C6F5B5A1FB25593FEE25DDAB213C25FBE984D6802482DBE6D20BE1687E8D2428EA747C41DFC79B4D4DF3969B6B782DE5C8F813089528066869464EBACB5A2964A14A516A3ACDA9E14C9BE1F4CA32B1598F3DC5A5C40B093BFE62CED892313CE1D04630BF73032491FE48D779B446"
"95" "EB7D61F69D0112CBDAC3EA922871DCF77DAE4DE08F5BB7D2684359A29370A08B05FAC3C7B514CF1637D453039974A3C4F9A149D51342CB4D15D4491DF05BCE6D7D29CD0C46432663F1A62AE315B1FDF8C1EB96162B2B7647FA4AB5F00CC1C02691162E4090BFC89FDAA7E25747E9FB35BE870E0231E8A22E28BF3BC01FFC07D"
"96" "5BF6B349E25115101305829E7165B611211EDCA5C604CF2A82947DE3B7504734F87ECF20650F3CD9A3F68A01599DC119A2FA899AA4FDCE48986A84B19D7045263049E30B83EA1DC43A9261B46A895BEC55D43032F231455E3DD156C0F15FD729FD9B97A5C7C73CE6494C04CE48DA9D1952164B65A813699EA0ADE363C02AB4A"
"97" "1F3AE09E89D13CEF844B67664C2F66F4138A2EFF266565CAFB9755990F1F46F1F4C4FF6842D371C6B95D6C3298C74A40F3D6F024EC4894E4D4C71B36AB370D62CD9013AA09BF3F30BE1676DDF76F895DDE981096121F5DAD3D71662413ECE637D22E0F4CC35C8CB2C10832653DCBA9355533D89196DFDDE8E178E5C63503B02"
"98" "C668FFD7A0DC0C40D59C5B6826BACB53644D63AA0412D3D12A532057C5C21F6352F6FD5895CD8361D2B6045A2458F3232FF385A7E1FF9652D8E7CF9D2D533560954D691FB4842F12ED1D38640AF86D144A307E639C9ABDEC6EF13CCE34AE85B56F0244F7F247CF81815660DFA23E17C120E0BFC29AB7CAB2DAC2E86689FD430"
"99" "A2EA2B205FAEE35989D584415C14C1AC21BD86952A5D300A2B11DEAFA022E2335FB1F5A4F547580774343E48808073580CC1FC700DE4A2DCA8E9072127B817C6ABD8687A053360DAE346733D7339FECBD1D700C960314342B0A47DBCB214D62ED7881F6916CBFE73033BE6B819719C3C83C9C97C619046C01326D8B5AB20ADA"
"100" "16D4C0F0505A10FC69239984BB2B73F25D3EE53C2C583570AF0736A93F54A357CDC9C88635BBDEF8A09BFF84B04133DC2EB8D2C127F2E571DE977C195905FF8D33FCF7B262F18670B7C2E811449011A387E40780D4A62593D92623387C1EB97B6652576F37CADBC96A73DDD51D58D5BBC278B98DF95841FF9E55EDE780217A9"
"101" "C965AA464A480344429D414B424E4151E86E83413C3337F93EA89BE09B58D15982128D84BF46563F8C169FE619766F2816EAD7240308A5862296AD5154195F70C524C60498B6B10969DBAC732D035D05297F02ACE5A3772041AD09DCE5EB71B09312AD53D22266FA93F38B91E3321794260190DB4D45319940E9DA29FB224CD"
"102" "9DFB3AE37286E601CBCE7F2DE04975240C52C04DAEC69AF5F26AC1E4150D85145AF378B2753564A309D041097E9D52D8574EB99D33CFE68912DC40F342E455C62934990F262E43C08D9C0F357B9ABF8E5FCC99EF64FA008DF22A23BF17B80C29D2F7E1E666C3410A47A0EC487642A4C28B5CDD83E5132DB10D39AB6B4EF8C45"
"103" "85FD1EDE115F302B4C1D2FEB2E091383C2FFA46935654BB961D0BD94A178073A3CC3F97904F5B741D0BC81DD2174F62F9B98A7596E4B57FF3E7680F0AD01ECA640FC51E28DB7D0BC255CDFF14575DAAB37546E276B29BCEC8F81F4C38BEF0DE72012D63DF82293679675D14CF0470108FFD7DBBC9CEDC51747C0920FD8CAE76"
"104" "73813F264A4A62B282FAD8ABDEAE1CDD41901A6A15297B925E6C5225810891B74852C9FCCF21E4BA7947F2CBD6A2AEFF19CB15F80BA00174B3A039C37794E6837FFE8FE4DDA7E64AE229A8912DF3312E232311EB7B19B8887E1F762737B6E15DEB1ADE34C0C44B8A930A2728B35662D10F5C2BDD9CB4125136642008B0E2983"
"105" "0224BE1202E14C65B6C8A92995FE556A8A74B34EF75B2FDA1A44B4D456876AF2CEC21BBC5102CC4E7897C6D92A2E49F09C354219FC40A4B2A0C4CAB84A7D1706BE1B489CFAECDB17409837940C4EF4EBD1DF9A33F3F23F95123A01F9673EEAE8B1FB677A3D246AC7CA43E136298176D61713BC7295FCD873A2E85747202126D"
"106" "CA3AD5DB48E0BDA417E048802CD9F7A6CF1B2B0785253EF96603C2FE29816D68EAB55E9B307E057CE835EC180AE1585E35098541E8C18E813062BA8709F00B5CA1275DA2F2853D16685386028D0F0B602EE7BE139ED82A3D18F959F6002ED9309323C1AA097761D44C430F5064196F82EAECCA85A497F52FEC5C31700708C91"
"107" "1A272A3E884F8EE8766CF0913C8E51693D0D0CB4F6BE845D620B013EC24BBB1CD8F5A124F9E43B87DF873AFBB41415FA6E5430C7E6BB29D91C2B86E917F1D3FA30877233321AC976CBA1549E909C72FADB2A67B5976C2F3EA9E37FD7CD9195D954E4B9803D5C1AE835EACE9BFC032C93DA35B94BBA88F76C9623BC080EE06CE"
"108" "06B72C33483E33C8B103F6D5597FC876EB1F7761AD0C475C6AE526E1277924C03D0D139726799424F072E06E6E8559DDD4AD6066FE52E3B033E1BEC071A15A5E7300C2AFDB141B61C91DD99E9434F1E1EC4B44352CE63B6377C5DAEB419A419ACDC1850874B779A2BA09E5DF59D78F2E9CA3CB9A54C43975D400A506B59F35D"
"109" "A76E2ECA1110A584899A36801E5A866399395F586A658CF6597E4590938CF56ADDE4F8D0025D39B4A2D03CEEE88372365CF6B20896104685DA7C8B9346C1B4BCCDBB00F14303825FB57FA0A64204A8AC986C96A197DA3CF2FD88D9B7B45731FE7C4047951C2679988968875590F704823E0A2F7628C8579159A05514EEF5F6F"
"110" "A94FAE74EF83627E238798C315639F334786AE2342DBF24CB9A12C413F770FA489EECAF8024CBC423BE5008043EF091B9E071C221AD0711592495A444C67F7F487DAF11E116AC5AC1EAE5F646B3DADE98A20F36324843B7A72D2864BC4D07B7771A772E899B781A38091B6A5B95F18375CD87221BBC3134BDAED8044904E223"
"111" "D366BFA190622A560FCD233BFA37C3A2C8419781733666AB75971BD8F25D3D52AF92326B66D4BE4743DB15C46FCEC29DBBA7489D4361913FCF1C973B4D6C661A459F4E7B4E428DF924669DA6FEE36990C2F6F1DE9BD4F2C5ACBE93607E20E70B4E5F2404F74F4F39955F719327348861FA7443706A76884488458725AFFCC31"
"112" "85C1F161D09A2B3F8CC8281E811E178504B063DDFAFCAF1CDB6120E1D5A6D58AD7B330F5FC7E19FCF540EE1C95D4DCD6AABCFDFDEE1585807803E4E04D6E79EFFA9FE6CD8FE1461F65B0D4033FEF7E0CD88E24014958A4AE6AAD133678B32C0E7B1BA310B05CF6070369259D25F02CE798F9316B745F3CE4ED5981B39E029B9"
"113" "06603EE5FDE7D2AA4DCC3672F613CC37002BADD3528946C547ED8A38178DD4EACC88390868E576302DCCA43CC2373DB2BF12AAF147E2C568636E54776DB3FD7E2776F8A3D4A01D692EBA4ED488902F29912EC638A0766D03EE9C37DA2F0FF5B07DAD00C1C0B2DF4FC39E381B528600509D65FF27FDDE299F891AB7EB06A4D9E"
"114" "162ADBE84BF7BF79277EAF55DC4E7ABA9BDFDFE2EF16267C34CE8730AAF5F8D91880F5B5F3A10E44511CC8C63FFC99AF27349C98283B8F6E9D33C84F614F736E67B95E49FF5F7615CCBFB19A91206D5B27E1079B90243EAAE1D2510B3BCA9FEDA8A62EF8279FE2C0554A7C7BA630689A78B31796EA654F0D9693B4E36F904A1"
"115" "BF194F8ACDBECB68E6BA3B5AF45596306B302D14D6B55B7C2CB41CF763D1E44DE3E62DE74E87D8E4F9F7B4DF1C64091EC1671E4118432EC315A3C76E0C4141F5BB6FDF0B0325258289E1CB5CC7AFEB7C8C30B211B9348FEE25AEF585FD120BC7C84192FFBF307DFD74FFB88D8C5A22A54CC3F1F18FA91A9A5F184F368454148"
"116" "3EAB4F580D3059B27CE55BF5D5853CFBFFAF5D704CFB29FF7F603B94E183F3E8F3BC176D0C4A5C71012E97D7B4E3EE1530F78197014CF7BD8854C73DB61A7FD00392D82970D1BA437160B96F7C6625DAB7DAE07C97B65F2BDE1E04C037D1B9F3E066385A7A768284ABF66A043BA5E07D851F29B01449942026600EF7E512940"
"117" "59BEC39F163B56DEF193BC8FDF9AA6207EE2AB9399BB1460E32E54B484D6998D17B49E9E78374809B1CC7AA5B6D4B452C5493A2523DBC184367C696F5658B1ED6F5BD132F02CE6A199193E317465B1BE9D785E7BA10D54356E22C1176F50EA460D3807DC0545DB944DD485958B5210EC2063D37FD5FE0D599489C0FC6D4FB13"
"118" "147E7173D8B8BAF41C46452A8721B0B8F042B45757CC81A4A8770FB7F3B9DD403E9B1967AAA4A08A3692398AB5ABCEB4E29CC3BCC7D4FF6232CC0DC4745B9224CDD737816AEB79217584C667DA8E86B02F0DCD1A6B2E83BFD061E229CAA282C1F1A9D05474388ECFBE5A1CA8C74CEAA6F63F9CCE9828B288F45082765EFBCF7"
"119" "11B4E9633C0F2D18FCA254BC66B7AE5352E5E73EC3DF312525D2E380E4297C0E4DD83A3E9FEE237BC531A08F74FCF84A8CB75F5C4F5A65F91834D1A6016F76D6A02956D2C01F6561A55A418CA292DCE2E313F5D61498C063434CB6FFB53E7FE4EB4E51FC170CF3543FE1137151F0BA3C292B85D36BB0DDBBBFDF6C31031D607"
"120" "A01AAB04DEDE02F8F046EC3FBFA408D3F24BB80300F60D674CFF318EA87AA531FE510D53187D4AF005EBE1965B062A22272513C981ABBDB0758B761DA022E6E9A30BEF43FE3180D4750B228A63A212E11DBC492C02F9C444CEC75A9811D0C4A73A9F95A99EB8DA4E4F1CF21565D553E35600BD5C93E51A2409FC57CC409148C"
"121" "CBDF110E686B3F17CDB5CB6C13EBEF114A59A43BAFBFF054EE33DDF9485DB2B754DFB8A8DDE7200D10A45E6B0E533917E28FED4122539F92C9B97830EAB1F7860DCE222F475C443443C7F64C5E256748A7991469FCD05552D08A8768FF7E99C786441C8ECE72333A53433056E1FEE7064C1F725A1E277C92008A3568A3D5A4B"
"122" "CEE5703285B2781441801F990F26038AF70ABA6E19E40DF628B3A7DA8988136612058F70E6A82BEA045DCEBBCB5E07ADF8BF2197E043CA6249F30DBF332736EB1ED1BEFE461E40E675D210C6B32E8CB0369FC6DE9D2FDC498558680B310AF84CB16F5A09FC273E91FAABFEFC680DD8CC5E3334956F3590BB8A3D942FEEE16AA"
"123" "00A290FDC32146B401FE1B0ED5A1DAE404AF1A79CA984D0E99D60CE0E84CFF37B1871009169E6319547E65C8B08C2DDE6F540ECC4852DCE576BE99D8E885B2025F9859B6F4ED920DA341090E87B707885B77BA08E7DE9567FD1AA8283ED1BBDC51993F4269EADE3CD3E9B14E4D40839DBA6CB37616A668BFD75A73F5AB9D72C"
"124" "8D1873EDCBBE0F13A584690FD5664B0B0F54C5016CF894D064D49BED41A3E1C7514566F49BA78B2D48506F0774755F37776AB81EC36ADC23253FC723C62203553B32E3DF8870443FCFD1768AF07FADF33D93DFE08890BFD4BBD04C423228271D300471F044036E207CF05C2F962A8D7012ECE84A21F010B573CF9C95AF245B4"
"125" "1C70142A7024353FEAFDC06A2F23DEC7B8A4BADD7BDBAEE680A60D11E6C069379F5A6F74F7973F6CDE4130B7F2913C49E543CD97BD61D6E74E8D35BC91E81ABE0E39BA8EA6794CCB937FF6F9129AEAF7E493E7E5E21C7815D21595BF354B217320CF7DE190D36A2471B9D4ED520E0A6BEF17540F4BA89A8904E96AB7128447B"
"126" "7D2F36507A19BA1C9E734270B67324FE97DB4A408D6AB5079E7B18DD695B5C13C7CE2949B9777568670F1597160D45F130E4EFF53E4C4B96FDDA6ACEED245B36BD5C2FF23D536A22B0C6257FF6A874EE89126CFF7A8795DA1B0EE467AF2570A97AE8DA70C364AA5E9FC5C40EEFDFAEDB77090855DA53D7131B79AAD67BEBF79"
"127" "55206F8591F27685929BFE70D98A5AA951094B318D385073A7529CBFB8C8CBDEB8330BEA4CA6A810C42C226B15641D03B48D99D8E11C8030E97D226D4356808EBBC913C9D2A7AEE8DF3DB319BDA7F8D21231781DCDE72B51AA73A34573CE05A8B13E3FDE85DE723A52B5F2B71E7E3C9FE35C1DAD6537159B6C8AED6BF6FB833"
"128" "57574E76BA98998A87167BE6B1B6AF2C8043DA6C2A9484F758F493902C7754B82F226A2349F3D8B3474531FCCA5D47AE176E12B599770EE6D2D411E2A8F99A2E28105C3EBAD7635FA55C698723D0E121A39FC0939253FF854F44B742FD87FDEB6DFB7F7DD262C905585A659EBBEFBF8BC26F802E656725FEBE3E1E7367FDFA2"
"129" "48E4B005502BF377A044756A263FEC5C29504BF92726E64CC16DD16CADCCA373655914C1340CE8D397376D1566F04B40726E655C0342ED80559A2733DF5DE74074491A387559535BAEDC779190FD5325B2A2C669F6ADD4DE288C05CBAD52844A313F9C08811BBE588DA064A41EE3481D6F345FE36C1E09880B879C63FCEF25F"
"130" "579BA116A57502C447C942402ED22C337D7C5EE17070A1F20DAD51EF1A35FE4F01C8A163EC7DA92C59696A6A0E0BFD63C0BC11D790F7C7F4E79981B3974E5E8BDFE3B5D244637AA7BE50AD221CF02E7DCF8CC7CCC6A24580F60309D85DB43CA52CFDB372E804353D2D73A4F44D1B9642542F78D8721262CB3E1C3C9F4454B00"
"131" "2F82C358C161EBFB04003A18875D86B01A1F19B9CA5AF89CE1FDAEF893866450418171CCCCFAD444676DBC821073793DA9E31CEDA169DA66025B1ACFA5E83ECBE1F3927DA04F90ADC1574DB6C61C037F3FEF379F68B71DFA6AB0A945A25002B8C4A9043D950EAA888C8CC826AFB3DE61FE29376832EB39E7D60ED1D212B8906"
"132" "1030AF0F6D8E49EDF908DEE681EED98870FE706EE1882B303F47B5EDE1DDA187114F02793E404AFCA99F02DD740C661B0A235EB1B5F29B1B142738433BCFC90A264A497D73E9079FBA73E9E06E437FC5537B8B18496FF0BE839D680CD0DC8CFC0C4AE93D26005D7A368B403719764FB6DE456173E70CD12ECD356B8F81209E9"
"133" "EAF2601FC2FD0C193AC946DB3BA03A5A6DD9EF6E1EFFD3D191A637DBA4EC629D4F41CD6C4F535B1B9830DBD1321E743D2A7CD9739F215F42583AF50856D51805E9C57393B59E10E8EDA36F4478EFE2F29B7661B44A21C0CB80741133AC24490DD3CE8DB9AA542D591F2838A3B851AF4670D3C3E9FAC669695D2D0EEE62313DD"
"134" "5B5A7061CBEFFBA28D36A844B9836109EAFBE38AAF422A607234C7406DD9AE6361817387EF2451FBA7F31403EA14B2FF61FD50C2E9676F4A6BA41690C05675A52869666B96F9CED1F78F5E52D69CA1370E95C989C553876A32DED674E8EA1BF8DEF24DF7F8E9DEDB643DFA1BF139CB7D957CE29AA54AEF6DB07AAC467F2B4A3"
"135" "E915299E7028196F32D8492641DE96F32C0A41F256397A9E1826921885955FB217088C8F2CFB4A853F0F4266E3093F2D3492E59B96A157AFD2C67DA8B799C54EB3D2AD837DB91077D3D794118EDC36B7557996485BCEFBD94091DAE8B2DA134078E12F080ED3EE920F4DDD63679CCEE0642F722C174E5DFC56FD38E7C9495BE"
"136" "CE979BEAB2760A70F9E927A00FA30761D85BDAA72E05D3E9E5BBF051A33B4071F1E0792D439CF7797C39985B371B4A7C7999946AB6EC1FC45D619C419CFA90129891C771A39924428D7CADFEECEA09FEDC5A814D408DE7C2C30D1660E4E3057055F9A10E42C0AC6BFD9A6F7B3AC6EB49D822AE5AA83F411CD27595DD58FD585"
"137" "3990D004EA289F177E76376AC00DB3134C4D0261512551633DEBCE00D05D0F1FA9A6D13FED97DEDAC79FDCA80FA7550BEEB0D7339A51FEC810576DB258E5000C5C5DA20E490F6645EFEB385BB6700B61F1DACAFA3E040238A5A0DF0D297DE4E2C1A2810C222E47F9508BB2BE24BC435D1F706B3C0ACD0659D031633064C69D4"
"138" "8DC42813EF171716B3E6AC29EB11DF93E0A11EDB077A4F6AC7F9CD2F6EE4BA0A247F0289E9E083A635278A4F450844207892A9FB0EED0002856C6AC9B115A225375B626E2B11B1B2FC5E4D98AC666DBE7407C09485C1944379A5A7734DED3C8D344B40089268268FB54B921D6AF18A72F0842809BA43870FA3595C25A16B5F3"
"139" "29D8EE373E738AF08A1A140EC7D34AC157549B5832325C038EB6F2DBB2B2008CF06C23972525FEAF1D360FE004DFC76EB9553A969269779DFB5FECF8F097AA0D69C5D5656F54DD3C31E97A86C2E67B0DAE18B9803E70EAD05A1045539CB4E37EB4EFA71A7956337AA2B1A046E9CB53EBE9BB7EA5323ED8F977D22ADD50C47EC"
"140" "A2FBB51AEBB1863B45619AFB69DD1E6FEE4841BD03753A39A64AC3E507AC8BA7AAE3EF179F6C18180B6055843680D242F5718FED17880D6D9C348107BEC7EFCB9EDDAAC637D81980AE6630EDE080019F719D07742E52243234EBF5651E2A28D1E06E3C9F096A83A76C9CCD5995ADAE13CE390BC38FA8F12AC9E2070C8DBBA89"
"141" "90AD4006997DE79F1C735FD39165BCF32FFA9ACC56225202410FEECA60831237C9BFB3A2E59E013B3BF8C41C022FDCC618D979CA654CB95A05A59D432CE34F9FBD0C1FD755A26E671140536F4F3268828BD6EF588888C299EF6979824A8E4BF45FDAAAF9CC9519200B87EFADD755D28C8325BE0E02D93EEA69D1B4768767735"
"142" "3AFF492227A9FB001467121DA10D95F3E78E297A89C1089AD26DB5FBEDD8130012138C4B65AB15B68DBC82C8439D152CB006E2E73D1E7ABACF3E54B8DD5C61D7504D8CCC855688FAE14583A5EE343E32FF5EF9EA9CB963005E9664D79AA0F6AF7F092F82C604CEFBB5154FAC253470FCC3F398AE17E028349BB42AFB741981A"
"143" "8A6247595CAF0034EFC10DA541CA4141CA35ACBCF5D9EE07FF5E8D6D6A5364DD80EF1E4E8755785DDE47EBBEFAC192313FB94DC8E3E655D579728B5481EC130592A0E2CBF8391D4EC090005A867692209F457F9B2AC72EFF8176CBD6ED68A6D147E718D6AB5AF55F1AA44ED33878093D0A9B8F30AF28A2676EBABF92FEC6E26"
"144" "2D39E49CF2CB5C8DEAAC58B8E4C0D5F6E37F0426124BDB8261EA4259A732FC67A12B94A5325B662BB3AB4D3B3033135F8EC622EE68BBC20EB1A4DD33B128AF265DDC7ED976F12B2A4D5E3C843E78FD44715F3B11AB68132ABCB4AC534A5E79B7C54BC9E799B68476DB6A8D9D8C0932BBE45416D4EDC5745109BA7993CDACBD2"
"145" "E3F67EE850EC000640D15AA33A3B6103886D83031A9F7D8F34006537F599DB01DD8F791476F92FE14BA8556754EF883D6F137E0D0D00C926A5790E5207099CB51ECD3AAE01213C134383ECF5760FDDB0B9631640E97A22EF294515164E8C7A2877208749BA38A049B205556A64BA9E4ED8D03B04118D697B8C85CE0FAA8D31E"
"146" "2A6A82E4663ADD0933D2B8DC63303A08BD64E210ED2B2F9A4CC513F700E3F9E0ABA5667CF7905B24E120B47C33A27B1E801E26861AA90C6863F5808E7CE4B0C4D4ED9D0705390BB48944603DE7B720399378FEB40B01C788A72E6030F54146D6E0BCA3FD8D4239D66F87EB9CE48288714B2D3632A3B490A15185F7BF410B1BF"
"147" "945C682109EC2F9842356254DB911EE9B052EDB1E6CE85075088A303C71CAE5B979219CA870B440778B8060A89C6239122946D418F3D9B53B9F8C3A9AB955BFAD7FCCDF5703D8D8CF503052BCCDDC09D8D385748909DEA5DECB7A483E869B5CAC689CF5A7696140E8AB628938ADF50E4E25D04E1B01A756F770D65AB571670B"
"148" "1546B4F7EBC0B9FDB95659A57BCF0C5612A5C86876239B7BCF40985F6922AC0C6E1B4FEEE5A0FA88CA36E8F4C7E715DB119B72B406C69EE08C398BC5ACADC5BAB447D6BA847F2B14CCD0797B90A1AC25E0961E005602F3FC50C60EC50D5BE94D1AE5092D18E430E5C75203B0AE7AD6FA13CB6949C3A0A3FE5BEBC5C243944F9"
"149" "4FE113CD8C7E0C68AAD1755EB70F4C269F864EB3672099A32A7A0A3959D2050A8CCAA3B507F4BA32B1D872BE511BFF1C6B2132E28C690118C81BF2CF3F852E43EB4DE52A5AA8F4DE255B24336229517D7E380CB690896F56AD74B16997F10A669997C27132ABC6D121D822C3EC4400AC2CC9F7C9CBF81D74232FC87621536BA"
"150" "E7980C2D497AEDAD458EA5335546E9AE40FEE6748C3133574402C20F6B031D5087EAB39DAA722810A7F3FCBFF2622C78BFABAEC2491F16801B9DC429A627974AF361674578F1F9C0807EBAB1BF32BDDB382262353645075F3BBC699D497B95BA412881CFDE1106917E00D2F4213A0F1FA35010623E6A3779355AB0E06E9594A"
"151" "4408AB5089117AB316B0B8D9B6EB4778BED21D2801FA1D112BC0008E3A5ECBF0E80C2CEEDAA42ED4AAEE291E9A5C62F06230CDC7A091BC5F39BF31DE736145F9391EC704A4874BCC653FE5345412603125A6B6B2914146D9F6C3441F5BEDA1696C55B38B84B6D4D039C225461ABBD0CEDDBE77863AE3C7258765951B9AECBBC"
"152" "4734B13911DE5892D2129D064C49C1C065FA5933F3598F44672D3F327B56BE190C97FC00E7659577A1E61C967FCB0C70B13075F782B57F5C8E25CB6309CCBC6A5176C84C6335A09A00412383462B0C661A6D108DB9E0D5B5DF7B119E231ADE3C0FF369D431F221582E420DB1F55FB350C5EBBB5C7BC7A004615D2D6B892E49C"
"153" "99DF8AE3B33D25FE26983B982CADCDF0D79C691413FA6985CEFC1D00DDD80E30BAA1B0A2DB5546D7404194DF1AD4EBBDF07DB4F42A052310CD93A5A9FF9872385FB5644AEFA91DE923734C2477678BCAA1EA3B8D0DAB473CAEC0C72B2467B97DB6B2DF883A6AD884EE3CC78C884C3DCA612186306215DEFF3C4971238A2C593"
"154" "F28CE3EEC315834455AE6B3A8B881B270BCBD98D7D210AF3AC1CF5DFE42CE6DF23E5D4CD6A3E173D47A7F9B007B60B4808D553F1B5C46EEE8BEF8A2E22A00F4743AEB3276D158E75431D2BBFC541592AE82F9A4BDB2E3A1BDF94D960622F2B49D2AC129A753C132CF56CDED19ECD640B420C66C957D8CFADA362DEB3F1CBFE2"
"155" "F8C831F71FEA603FB75D2718A8D6123D127863C57FAEDBB700D8EEF842A94523C554F85C49A0259C37ED24BC749E68B6DC46762B4C84CD0EE2B01174BC080839C9BD27CFFB197A4470344ED7AAFF9B33ED6936628D7EEA8834B019F54EE3DC135F63F2F527D133DD0B6613B462DDC94C0679D59FBCDAB7F362A7BC4A3321B4E"
"156" "B7A24D989242526BE8FE6AA26D873C3A8A49A0190935EB103F4677219DAB524C130597E5FDA5D8EC045ED907A43603F6DF85B0806758AE9C8344903B3FBBCA0537AC2C7BC10077976DEE41E8A5AEB21E4113CCFAB14066B2725D3D868660243290A3E6D5E808B9888DFE107B74A06139378D5E5786FA2AF77F2AF2CC135FB49"
"157" "49D1729348935DF791B0A4767B5751774073AF6B2BE1665DF26042FA9C4436C6431E12CA6E6416436ECBDB543DB0A00AA389EB36087804EE3368EAF7B5012F0E93CCC3E925849268CAF10EA817CD409FE7A84D30404A7FEBEBF53E5F65907F9A8079EE033B155E547D26D264FEE30CA1FAB71A927CE5C155CFD6320C3848993"
"158" "9C9CC5964442F70A3540E3962E693D7DD19D9D9E8D9FE9128F3310D534FD7841DD3CE6306AC5E3F203333FE0346AA34C40102CDE239A3D891353D43541DE898144774D5AB0C5B807F760CD28D79FEE237240D5E7503B42F04CF6E7D32FBE0313EA75E12689E1C30737522ED837BAD905A5DA33953FD96CF10EADF5299DE11B9"
"159" "C532A28A9C75D53173BC25324CD779F0471DFFA001A547C3604F629FBAC090DFE3CBBEFFFBE134CAA0E4922ED76A8CB9C257E1271C9300B2B79114AB2DB89D4344BF336B601F739A2C2F9F1D0D9A83F04D5A09158AF7A43C979F3DFFEE469D4C3EBEBEA2FAF7965303A5CCADF9FEBE899F337D673A9F2A100C065DB163A1AF3"
"160" "9D66212DF89B49AD563CB09A97CB51BEDBC0D64D34638AF68A98DC7A16F4D8698D9ADDD810F9B30D3A7558B4CC2C2C0E1CC0637C376D73469E466F87798E88B348962034F81D6BEFEBBF95412F16866757D1822BC1BA2EAE4CC06A4DE44D42D90ECAB1F43A85B8934BB88BDCC8D00C1F119BD425DDE96B14B2D9B4CAEF20F63"
"161" "A4167E1311AC15B1984C65CE9417E698B15D1B21496F44717591EB091182A6B96842980B588F22BE19ECC703A17ECA1FF22054038A7D1DF919537B05233C1F76ECAB5A5D59FEB3FBA70BA0690B83D13FECCF82D38EACF362968FF8D2665E6620727FC287A97E0F18E2E5F0FD42C174E075BA76BB7B7F0D259FC3256621E5912"
"162" "BBE7D6CC8E4DD98C112373AFB32605509E5CC7B1EF7B3C990BAB8DEEF6586446F046B5BB6B2F70845B066B41D70F18D505EE7979C9537B5647CC9A91E6E6AE5125E662DA353E2A8A163647049A09E60C60D285411BC5BC43550AA0D19FAD997B66031333ABC409E551D9F3114587DA97E352E625BD30FB3B7023C35366BE912"
"163" "97C035E801233FF6400AC0AC71AFE5381AD72EFD1BF4A82290874A49112613C7D61D37934EFC7E965DDCD30CCB9517D7DD4627470C4AEF80793FD2408DB2C517779BCC67780134345CEBD83A71E440B2682FFC6B0D082521FBD9F4EB1F2BBBB586150CBE542186E8FC64FB6060D1195606241CD930016D9F453DD8A65419DCD"
"164" "342947E2FE6F4ABF91AB45383015C2B64D4AF29D15225A8A054F2642DD5755A92AC67AC193F575E5F3CAC2960DDE3CC1CAF2EC68E6B737F987D6A0C3EED6123301F35BF9FD8D00B87161B439FA0123528754C9D5841185A8955357AB0C85FC7C6B387DB9CEA2A794A8D1DDC461BCFE48EFBFC1F547120B26434A4A4A9F023C5"
"165" "5908E7AE1858AC1BDA9D8BA2704DC134088FFBF3DC0F51BC6768A87B05C9976FEB6E6F5A8BC97E887DA150C6B20A06275EE0C1BC3A54844BDB8EBF561B8A63E18C69B524CC04F811385483C5195CFFAD434F7E03A8AD0F1CEF77C0B591A8DB188CB84BC3C59AF876AB88A4C294F3ED7A1867D8A54101C6B4412DB3A76E2D09B"
"166" "156BE369A6DF75F115F69B14CA1C97D60CC6396C1275BD5F1A20B6928E1B25EDCAF6FE406A5ACE193C5913E1E2020F365F9D30617FEB8257512CA91F135BCA0388A3FB6897E15907C503B0CF3B1E037B1AC9C3AB8E22C5C7B8995F327B85157381857ADF76D43FFAEC98920A94D34C3C7C27ADBCDAF03945E20192657CD0F72"
"167" "92E1459AEAB0324BB2A69DC9A4DA20C6672452DDEDDA98437865E45567C1A489E3C8E589AC1F4EBDF62D2B99B91A62D081ED20B4CE164555D740865396EA954C70E7DC5FFA640845305E19808840C6AA7596089860FE864F55A8906D7C66C2A3D6A0F0B3F025E2B27EA22700ECE590C7D2064B599F59883EB4CF18DFE7EE7C9"
"168" "E2F7BB4975E9FE8FAB8DEB6FA6690E376BFE609164DE13B1B26531EC7836A303D2C69B11D1F23D626E5878DCC197FDBEDAE7F3B1FADB36B13373E2DA863720121289BCBC5A923D7F815FEF82E7BE5C7B07AE887D139F4C5198E77E4C5CC53F6C23051D90AC0E5C69380500C0D701919226ACBBA5CE9521900F22E7615605451"
"169" "80071F0D2B6350CB4D1F665F49B602CCD40E89D07CF2785C8AEC9C4985EA1C4D3A9600B8274DB4B76623FFBF6C0A23180459C1A334330B054D49AA056D085449BAD0ACE5312996B43C682D7B10B1767EBB822256278F93A9D514ED6CBF7B2CFF9D2F2F6754D9542D35F3D815F96D377A63CE73031EC5A41B6135C66918B8C09"
"170" "A5099C2E6229C0D84C34881D341A6298E7A10304331201F1B1FC7255AF2FFB494B8A14CD71DC3A534FF381711D5BB9A3069CB5F75F03E848BF2FD974F8143473E8708669C701E0E70EAE11775339977734268482B576FD0B1FEDFCB59B1940BFE6BC05F97A7F55D8D5B1547C994B34EED260D73308843CF7BFECE8F24026415"
"171" "28032F63EAE3A6A57F878927927CA727077CEC1B97109A8E9A651773165FABC3F39F3C5F580B9C8E617B64B3CB3787948D310DF822EB6225B9655E3B8C01C6DDCA67E66B2AF8B11D30DBED2EF86F4822D964E7B17135D57FE909DF221822D469F81772D89C73DB096D04D8B738742C3E4285705ABB7EC31DC4B83D42E758EDC"
"172" "9302E2DE2306E0BF5FE26058B52A758647CDB685F9A577DFEE9EE5C9DFFF717EF9B6D395382A13D682026A10ACE9636179DA061C63FC0528835A2C6D35F5C2F34566192FA9EBE7ED9DD36EE9E09E35132A794090DE89C87CD380092880784375AE501A5BB60AF4894F8B222EE917D6E60FF50EB34DD7130F4F70B218C6EF5D8"
"173" "F0A176AE1329FD0454CF203E4705EA4B163E046C715E9216B5EBF468CD9E897DE76882480147B6A0BABC930649465944187D2FD2E8EC8FF073FDDF390D9B3260C8458C228F1E1EE0259CC728DCE9B5142744100F486395863784B7B85CE1B91DE80806FDB0767092ED30117362762310780318C52AF9E99021C12823B412893"
"174" "E04D558D8411EAC746B0AA67AD734D7B754DFA4676F8830C43E00C1176E40AE7CBFA0A6303033FADB00843DB9C9375C755628DEB421779A8B65471D218C7E12CA9755BC52A7D5BEF48B62AEE250AAAA9B85F6AAEA83D18AED2D7EDF45E14A398B0AB6DB081760F57B6454266933F1E7CD084CA57CAA0D2370FEAEE5B653EB0B"
"175" "781D255A29B517E3898B28A9E89357D57D79CA7D86BE990A54DA5DE3963BD89E7037913578FBA1E273D6D5D631A5DCB73CC2F7D9D5DAFAA73801FE5BDF295F4CB6DA5C0142A345F5E70407B6805171006F13090DF5C045C412C9E4D6ACB162F29CBB52C71A9DB45607C900CA8C02080682591DB247AB0BE0F84ED5BC73E986F"
"176" "496C75D3E59AD1A2079B9BEDF3C4F50E6F9868926DA490BE4A29E47AD8C96C9FC35E4E1BA7A1A20C26BAE52B17C9FDCEE8758B5F7B68CE0AA4D582F89134DD200E4979396611694217E7C31F422F9154E2ED7886E688C18F36F916C6CA3DE63BC1F4F6B85E940D869FDE0295E89A2FD1B3E62C46214EF4B379263138392093E"
"177" "373484B3C648D35F276EE0AB8D7C77656B16A3C896A7ECC676E65895D990ADAB558B0B17F4904184DD86A1FF0906E3D2964A774AA546E899C7FBDBC932C46562C93CF63D6D30BF8C9547D7813ACD5C88C58E428E4D30D6B49E74BC77DE5A3776AC15376272F9E94A1CA5BCF42E47232FF46DCEACFA355C3C35DD278E2EDAAC0"
"178" "80AFEA2869E8F514E5846EAA148468AFF537408B33F6A3B57467BB088F05EB74B8763F2B571FFEB9E91BF8ED3381AE9C23559C5A7BA641CD6CCAB7146C4533D0EBA1204045BD914AC2466714ACAB7319103DC1CA2D11BD1FBD5762073DC6CC4BDD9FDD3C199261DD983EF2D29B2B445E0828C7B472DAB05A5568F87F8589A95"
"179" "AC5C6C63274AD0978CF47FF36D3B2FF2DBBA8D6BDD758A6F17EEE9E12CF8B8A8AB3508E3F284021D9BBDDF2FFC0E13CDA0D8DBF5E8C19DC27AB8FEB35A81DE81C1C2998CB67349AF8E563AB26CBE551E766482505039D60F4C642033A5A5B41070F92D21177C31985EE877DD0156140651A5550A00C39CE3356596F9E3C1A49"
"180" "519F2899B9CDACBD8D58AC01BF917FCC23DF92B477FF727EBDF4767C8FEC4BCAB8380008BD8DAF72DF3D19790CD76A313A120BE811D63F833D94C1BC43B3271002910B5ABA694F5BCEFC702980E752E5E5057F0112FD5AE4666E27AF76506240C1B8CE95583A959FA6525710693B9EEEF1094CF522C95C6A521891E7B38C513"
"181" "029A76A748E38135380484A8B74B2867733F89CAB14EB3A52CA426B43EF5E2F549C3EA5D989CB51BD6680A596EE88376CDB4EB2D52F268C58DE77C1D3AD89E1CF0D00174F9A2B25C7D15C0669E6204F3C8515B87DF10C5C7AB58628E6C5B94EFC2422D6E0AE5E9CA3289F30736F343676C54C87AB240A0E5B895A3124534F6B"
"182" "16A7C2064B347A4B23F51DFCB6A53F557A557EF6D414B0C986329408DE22084FCC1E5F6AE64C0C084778BD1431222580336C32EE266DFBEB0704FC16ECCDF6FCC82FF349FD762F3F42D5E4D8869DBBA341852BBE601020F6DC3A9AEACB44426914EA02CBE4D024639DFCEC35DFD22461BF31D73C972188EF016C94589433C7B"
"183" "BE5068FF983622FC3367713EB15E6026888A131301F7C3A8CFF2E679B4AD2983899C9A24E21DD8FED096C5EE3D1AC125B1CCD07C90ADDCC27CE81860444A4E1A557ACE2E2144760C34F0ED008B0376AE687FBFB7A13AF80059252DFCA910B92045AA73D0B739095827C2C3A3C3EDF09234CE5A60345A0DE9BF3938E597CDEE5"
"184" "97D97962B76487361B42A25DBE3FF8178B1829D4DC05EF52E63FE37044E6B4632E4B8FD476EDC54B7BCEB44307C41C17862FCBB6C6879F586431E2D7A60061003A0E881418622BF7F6D6B4C5E7D60B04F0FE79359BB78646D59B0F71CE1174276C0B16F2B4D3770ECF761FC14E55CB21F186BC66644AEB66EBF0CB00A18287F"
"185" "EAB7FAF8B948E6C4A07DBB0D60EA098EAA80927F1AE1842F82E2957333B8862489B034A6379B528F53B219BDC60235F5EE6A5052D7D705928D250410A8C8A5F103181CAB82BED6FF2D4B6195930E3E4A9166CA22BC2477C3A1294A97C4C46D6EFFB39822E4A3ED5EC397E78851B3C572B95BF1D38D4B43B0C31E945234B428D"
"186" "7D9506301886DC65379E50FC6F406D14CDFC16597D0E0C57960E4A693352C6021788DF590696EB839122BD21967452FB215E3A0D438058C5E7C19678FD7023BD5C7C5DCA3A008959BD359283034649960371A8F55DB1516FB400C0790F256C8DA087BFB3425005B1625E6C1EB53A5727E6778CE7B9CDD6FFF72D98CDA30FCAB"
"187" "A6FE1893DC1E8E91CEFC2319AFC9336DB2C1515478D63D567B560E6BBE0C604ED815963A9C39C48A7398232B3597D0229EDB761D764638CA086CED643AC12C0E0D86A9EAD95D7F7AA8731FDCF03BE4467250DD6CF8F0461D0E6863705F17AB88A1B16B4A360CC3C87CFA065EFA61590D727C193B26C7183A038FF1EEA38CE14"
"188" "33F3A8E00513B9FFB329F622C03E4C98321BD86C7D76D202A96EEDB0D0E5E290996E48A32BE3C10F87C1C4FAEB8701D45C7C209E4CF0FC0FC4DCFC52D0B0452EF8436A29F85E59466DDE790B6D4A2728E24830990FD078AA354DEA0D9349F39C55F73AD333F9E9F05899B8EA5B717F5B0A6A9EF665D963F4E6CFF1757A4B0E6"
"189" "1E6568D20F21474146CE568F7AFD79B8732A7AD3BC308126ABC11574AB2A7928835BBD358952FC1A96E930426D390210735BE57529447697AA51303753662840268518D5B49F107CFD7F3438AA5E03C60288EBD0474F4852630199AFF2A74851E09123973359F8F1D0E3B12973251E921A62B44449A9D5C2F1B621610CE27EF"
"190" "9E932B4FD4C4C896F4C3AD41D0112DC66AF4A848216C9B0E5505B8BFAE2973340B949DCF113F5DDB19A4128ECB9B1A61C5B131444B18E175505E3DA2377AF8F262C9899437F23A2933D2DA9B658FE7CF578CACE015C13EFE64325B6B60FD39166BD9018B36BBDAD94FD81A8E7AAD81AE44EA91968A7E92D56A0508827F5E09E"
"191" "511E45532D6217DF9A16B8474E7D09A4F14330CDD2512D7F85EAC2B49D6281F92D1F61158C806C8055248E62699FB66A036FBE1C4271AE1C700B6476288DEE3C277341FE643BFEA7B7E4A7388D7F544720D60CC1F4C54ABB8D3E6D26A6EA209B714FBBB4451719CFE4BE4C0DEE18A4C7AED46360F1CE6FA8C9C4C55A8AD9933"
"192" "DA63B2157C69846F66D9711B7E1C8ED4697A1863008BF1ECAC54BF794DB0E220C608C484A101BA3E3CCE3B5AFE1064467CFC7F9DE3B6D0C3E914F1F5439378F4747323DFE96EAD599DB2444761325DAE22715D1E6FAC3B8C201EA08F54C6BD314F22C9AF09EC7C80E7F9123EEC6D6AE6EDE826FA687E65299F9ACE68BF7FA76"
"193" "9547F8EE098D3B88CED4E97224599EFDC631C67D6CB0035E424F87DFF1668C053177748817F71D38EDE6F612A42580FFF6B9AD29002D97D5DECB588D1313ABAA87B1EA0347ECC56241AA7627C5D5FF265E543E30216B3649FD3D08CB05185AF7BCF0486D31D0BC4EE3762FF7EC8475620B1317240B92B7FCFAD11A72971BAB2"
"194" "4DDBF46A5BD0BA021ADBB6C617A31BF60349A7F79E6D922DEBEB0219D251439E6FD490355A47EBE1380CC2C7A2862CE80F3F4C46E4FE224EE960C2DFA1111D13C92332E06467B80E80DF300F4C542A708798DC077FD21A0330C0AD8160A45042364EDE3E67D79172F280F3D9E8AB3FED5AEBB86C9D56A341EFD730FE8F9FEAA"
"195" "ECF8C17217AA40B23925C02B011FFE776FFF5CB2CCACA1C50576CA9F3EDBA1C7DD243EBA97823C1DDEA911371134BAB163ACE695F75A54227F2BD6AD94973C44205C06371C615F0E64A46F0C3A4AFB4ADEA494CBFA9D67545C83E9B9959FFEE7949B64557588036147B088E8888301F76A55E3E06C09A549EA9F6DB2CF6AE7A"
"196" "F26F3C4472EF25F4FA3CABBEB6CF2636EAA74B52F83C6235EDEC92C9A4016D7A9CAB4816786595B48FE2B3C95C331BFD6B2E7AEE878F0E3703413B2C5B5884F596FF5DE727899AAD819BCB6DCEEFA79B016192C26EAD493247FB809793BD507FF6A175B6A5D54C8A5261A2255F09B973BA5AE7191551471C500D02CA84BD0F7"
"197" "A46191F3FE32CA12669AB01C9FD0DFB4D0AB7DD072C1E38CFE9E26185D5D96C03EDD6F32685916882394A9844E6F5A21B57FCBE44385397F8E8330EA12518DA902A80A4305D7987D39471AAE966BEFE02F29C08379C3B42E0F1E79F854A9DD8CCABC1FEDC1C576A8A4F020E65F3EC27D43DCFC1C29D35AB6CB081C5BE821F20"
"198" "39DF83103D35680C0D2811032B86E1991E408C08B86403D55684D89ECC139620AF5FC35E89426193B33107B03C53D0C6E150EB99323D7896DF9246E0A4D283270F96FAB236486D94143971825E3D71ECCA04FD679BF08C62E1AE61E57697518CFFD0468957531656CCBAEDC2978AA1A819DE29463070A8382D069730FF844B0"
"199" "FA75B1202B76E34A110498B90A416BA337BEF3C2143A20DC2E3EB892203EB8F526DAA4F9AEDEF49FF6C63999B8439D1809A17EAE4AD255F29E3DAD9D2D14336169AB2D930FEAF5BB1EBA98B007ED15D2358C003B52E7EE3CE472E829B9B3EA1AC265E611F9BB600F6D8F1DB778A6A8ADD91355DE6AA3513A637CFC666C15E85"
"200" "2E25CB61BEDE6664FF5758CB46D5D53E1BC692CB8792FCDF2B6E2E9DEF55AFFE8E3B58E1E0970C78021334CA678CA4BF53A63A07C38D018C2E5DFD0F6102658588EC899EBCF7529D7493F981EFA62542288C3DF974AAB1E8E17B52AA5C25BE9EB409921220895D60251BAAC4C9650144F2759D3FCDD77200D553E3C8541D69D"
"201" "F911D04899ABE9BFD3C2C4EB00771C2624A45F2846ACD137721BBE54597CD708C6EAB19FF9B7139E29C13CFE04C4B1F10BCD24FF994941128B964936C342C51F5F4011AE71BD56113FE4B9B8CA2D9FFC66B9B648F8CA2A374114E449EFA18FC47B6AE6EDB65B6C421CA200FDDFC748A1ACA1309371E770B9F7A287477D2B93B"
"202" "4A6AA65FD54C88B0848F0ECEAF470E015F8858E993EF1E35A8EC5922A7E6BB8C7EFB262A4CC1D745C122D647F9033CE458173EADD9555CD92337525C493D3695E04213B5FFE0487C77EE6453514A0F7976F1084800BE47CCAC72A703401B62C518756B4AE1F50C9629BF46C0CAA0DAFD81744796FD6581899DE1D3CF1893B53"
"203" "77F5927CB7BF9C78E9B8FEFA5F3E1BE7B6E52484D2F4C3C294717C1177FE538F5FC007562C839ABA48C3852DB246FB213073CEFF4BA7"
}

111
scripts/npc/activelist.txt Executable file
View File

@@ -0,0 +1,111 @@
"whitelist"
{
//"npc_dota_hero_ancient_apparition" "1"
//"npc_dota_hero_antimage" "1"
//"npc_dota_hero_axe" "1"
//"npc_dota_hero_bane" "1"
//"npc_dota_hero_beastmaster" "1"
//"npc_dota_hero_bloodseeker" "1"
//"npc_dota_hero_chen" "1"
//"npc_dota_hero_crystal_maiden" "1"
//"npc_dota_hero_dark_seer" "1"
//"npc_dota_hero_dazzle" "1"
//"npc_dota_hero_dragon_knight" "1"
//"npc_dota_hero_doom_bringer" "1"
//"npc_dota_hero_drow_ranger" "1"
//"npc_dota_hero_earthshaker" "1"
//"npc_dota_hero_enchantress" "1"
//"npc_dota_hero_enigma" "1"
//"npc_dota_hero_faceless_void" "1"
//"npc_dota_hero_furion" "1"
"npc_dota_hero_juggernaut" "1"
//"npc_dota_hero_kunkka" "1"
//"npc_dota_hero_leshrac" "1"
//"npc_dota_hero_lich" "1"
//"npc_dota_hero_life_stealer" "1"
"npc_dota_hero_lina" "1"
//"npc_dota_hero_lion" "1"
//"npc_dota_hero_mirana" "1"
//"npc_dota_hero_morphling" "1"
//"npc_dota_hero_necrolyte" "1"
//"npc_dota_hero_nevermore" "1"
//"npc_dota_hero_night_stalker" "1"
//"npc_dota_hero_omniknight" "1"
//"npc_dota_hero_puck" "1"
//"npc_dota_hero_pudge" "1"
//"npc_dota_hero_pugna" "1"
//"npc_dota_hero_rattletrap" "1"
//"npc_dota_hero_razor" "1"
//"npc_dota_hero_riki" "1"
//"npc_dota_hero_sand_king" "1"
//"npc_dota_hero_shadow_shaman" "1"
//"npc_dota_hero_slardar" "1"
//"npc_dota_hero_sniper" "1"
//"npc_dota_hero_spectre" "1"
//"npc_dota_hero_storm_spirit" "1"
//"npc_dota_hero_sven" "1"
//"npc_dota_hero_tidehunter" "1"
//"npc_dota_hero_tinker" "1"
//"npc_dota_hero_tiny" "1"
//"npc_dota_hero_vengefulspirit" "1"
//"npc_dota_hero_venomancer" "1"
//"npc_dota_hero_viper" "1"
//"npc_dota_hero_weaver" "1"
//"npc_dota_hero_windrunner" "1"
//"npc_dota_hero_witch_doctor" "1"
//"npc_dota_hero_zuus" "1"
//"npc_dota_hero_broodmother" "1"
//"npc_dota_hero_skeleton_king" "1"
//"npc_dota_hero_queenofpain" "1"
//"npc_dota_hero_huskar" "1"
//"npc_dota_hero_jakiro" "1"
//"npc_dota_hero_batrider" "1"
//"npc_dota_hero_warlock" "1"
//"npc_dota_hero_alchemist" "1"
//"npc_dota_hero_death_prophet" "1"
//"npc_dota_hero_ursa" "1"
//"npc_dota_hero_bounty_hunter" "1"
//"npc_dota_hero_silencer" "1"
//"npc_dota_hero_spirit_breaker" "1"
//"npc_dota_hero_invoker" "1"
//"npc_dota_hero_clinkz" "1"
//"npc_dota_hero_obsidian_destroyer" "1"
//"npc_dota_hero_shadow_demon" "1"
//"npc_dota_hero_lycan" "1"
//"npc_dota_hero_lone_druid" "1"
//"npc_dota_hero_brewmaster" "1"
//"npc_dota_hero_phantom_lancer" "1"
//"npc_dota_hero_treant" "1"
//"npc_dota_hero_ogre_magi" "1"
//"npc_dota_hero_chaos_knight" "1"
//"npc_dota_hero_phantom_assassin" "1"
//"npc_dota_hero_gyrocopter" "1"
//"npc_dota_hero_rubick" "1"
//"npc_dota_hero_luna" "1"
//"npc_dota_hero_wisp" "1"
//"npc_dota_hero_disruptor" "1"
//"npc_dota_hero_undying" "1"
//"npc_dota_hero_templar_assassin" "1"
//"npc_dota_hero_naga_siren" "1"
//"npc_dota_hero_nyx_assassin" "1"
//"npc_dota_hero_keeper_of_the_light" "1"
//"npc_dota_hero_visage" "1"
//"npc_dota_hero_meepo" "1"
//"npc_dota_hero_magnataur" "1"
//"npc_dota_hero_centaur" "1"
//"npc_dota_hero_slark" "1"
//"npc_dota_hero_shredder" "1"
//"npc_dota_hero_medusa" "1"
//"npc_dota_hero_troll_warlord" "1"
//"npc_dota_hero_tusk" "1"
//"npc_dota_hero_bristleback" "1"
//"npc_dota_hero_skywrath_mage" "1"
//"npc_dota_hero_elder_titan" "1"
//"npc_dota_hero_abaddon" "1"
//"npc_dota_hero_earth_spirit" "1"
//"npc_dota_hero_ember_spirit" "1"
//"npc_dota_hero_legion_commander" "1"
//"npc_dota_hero_phoenix" "1"
//"npc_dota_hero_terrorblade" "1"
//"npc_dota_hero_monkey_king" "1"
}

5
scripts/npc/attack_factor.txt Executable file
View File

@@ -0,0 +1,5 @@
attack_factor
{
"1" "C5ACAE5EA4FA4DB1C3194781EC03FEFC9A727ADDD3E567EF7D34E6A90230B37E73896FF0982A84D11BD6C3C10D71D3962612175397DA3194CAD6177EE789846B6A1110DD4ED3D364703377F2669A1939DFB88989BAFC85F4064CFB72C85A4E2157AF0014B0A4973FD8B22E8D73A9785F168BB1D425C0F0F789F0C305F67DC31"
"2" "A7307B5D9E379266D0641FEA9AC33CABB919C599DE68D26F1EF5977D845CF4D05C07B3B7E9151AE246D71CC509955BCC58997EE629225277DFDB8AA7E30CFFD56D554F986DB3B741CC376B0F97B6C6CCF0D52666426A3FD0BE620613B0C2C5156BB2F85B4CFC7022F69B22E9271B91DE6A3920FBB5B"
}

12
scripts/npc/combo_table.txt Executable file
View File

@@ -0,0 +1,12 @@
combo_table
{
"1" "C5ACAE4FA8E657B7F5557BDBA854AAF79C686A95DFFF7DEF344EF7BF4764F8502D8629F7C618CD8423869A83513CD7C2340C0B4197DA319480DF5037D1C7916D7E5B49DD608F893F3C7E0BA827AE552FC5EAB9C1D4A0D5B12E0EF339F40951744BE72844F4AD8E34F1F02C9F71A22D4D4FF7CB9E6585CCB783E0E818A44D974"
"2" "A7A6FA4F9E3772171064FB591B62EC3FCC8AA1789B5837FC2A71253971D821976F7293E7A8B5E946E553E9117C25EBADF82D1F67888233170B3B3D02F758FAE109828F2CDDF327F57F725A7A80C1027D0165D2A5644FAB65DAB0F2F3B52104B70A174DEEF88F3027A3BA33E9A7FEA29BAB4C111D50190129CFD79867EE4FCDE"
"3" "FFBF55A0305E7879050537DF3CF67AE26AEC9C4D15A9B91093143672C21C7597DC249D2BBE4FA15FC0D22E776056B6DF59DFD5D97DD59A5C454D71FCDB54BB483086786008BC52AABDD322B9BB2790DC908719F098A7A3B120D08521A1561345FC1AFB6C12DD616764CAE6FA637928093BA4FF008B4EA9899044339980FFFAE"
"4" "EF9B58A74F6B0F32B25735BC4C29AAAE97CD7AF0CE840B21F6B40D7AE4B386C004AE8811C664C5FAAFE72D1BEE49F7D05D9CB17DC20BECECC793C718B489C2A8C381AE38DF0CA26381C7E636702A76E1C79E9F72CBC73D9BDABD3195BE17494A0EFCC5EAD6A1C0BD7499CFFA6A9823191875F6C9CD23AA096764160F26037B9"
"5" "B1B5DA44B16742E17105DCD3BE007C52192EFEB5AD485F24C403909D879BA4727A6F49B75678A349BEDBC2CC3FFDB7D6511F3E291962B53F799D708F154A2003593849F63AF6A244B7F946628AD63EC331E7929900F214FE83B647FC9C8661A7A744A23777B9FF90CD044D10E8C79CAB4D1BA619C49756A58614C9C383E7DCD"
"6" "50173DC447D42699A3BD95404CE01A47DA45C4F1D5E5F2CA674CC96A3955D0A0A0AD75ADDE6D0E85CA9937C8780A089E1BAD836681346CAE1ECB7C159488F7052A172D8547D9EF7831A1C879B40BD6D8EFEE0F83DCC87A0F7C266C77645F1A8E3F08788B8134BA4A20B667EBC72939D2DCCBA822CBA96F900E4898FB0AEF29B"
"7" "75475056CA493E414381123068CC198E22C94FFB83899BDEE5673D178CD330CE503774DBB509A74236BE768CC6ECB9E0FD87B112586168A4BC7A46FF688419FCD338647A9E5AEEC0C771CB2ADB77DE888F66778C869FD0585C395E6CDD14F7D4EBA1025081459A4D84E9A3064AF2CE60330A4F1E8B6AA65944DA6BFF2CC7AB9"
"8" "65D3A8D7DE9D087F5A872D49DB8F77BF31234D6A86BE74AD24FA255CE721336C2E6CE14C74DF317F77DF41285D651B5A48322808022D6D0B65CEE720C9E21A38BD4AA587F3DB63443170357EF32636AF141B07289D3D6BA3E276F4F2BFB03FADAEA03FEE483F4FE6070CB0DAF869F10F460E8ADB8A38311391900D789E57B30"
"9" "EFA946ECF356B0579C4F3F9F48AC2CC49C1ED75EB85CB6C0C506AC01FCEF1D879D7395E726625337737D055536D67816B563F6547D58ABCA6C"
}

6
scripts/npc/config.txt Executable file
View File

@@ -0,0 +1,6 @@
config
{
"1" "C5ACAE4BA5F957B78D63279BEA1BFEE6F064288A8AAF38B5625FEFA01422B37E73927CE6B822849D028A878E1F00B5963D130A48CCD24398D5C91364929FC832314B5DC02BDEDA726A7E5CBC24A71338C1B8F8EFACB5D1B53828F27ACC13776E15FC325CE9E5D734AFCE629966A04D510EC9AF86798AC2B7C8D88A4DB9548A5"
"2" "B671DB6B3EA31622E4F19ECC2BF35DCB485F746D0BD9F23F0AF394B8811A21747FD35373CD464EC764220AD12CD008290BD97EE60DD176F36FCEB83333ACEE052D73EEFDC9C66380DB07CB8EF187B38824C52315034C2BF5FB31E341E1439172CAA458CF491F0753A7DB23E8B5CFF33BED7DD49EF01A14ACFE174AD6DB7A19F"
"3" "A1B639AC7D572A2541456FC02AE926BF26B7841A01AAB25B80083A6DF5227F87F3249B23BE6F"
}

View File

@@ -0,0 +1,739 @@
#base "abilities/tower_abilities.kv"
#base "abilities/effect_abilities.kv"
// Dota Heroes File
"DOTAAbilities"
{
"Version" "1"
"ability_dummy_unit"
{
"ID" "9001"
"BaseClass" "ability_datadriven"
"AbilityTextureName" "custom/rubick_empty1"
"Modifiers"
{
"dummy_unit"
{
"Passive" "1"
"IsHidden" "1"
"States"
{
"MODIFIER_STATE_ATTACK_IMMUNE" "MODIFIER_STATE_VALUE_ENABLED"
"MODIFIER_STATE_MAGIC_IMMUNE" "MODIFIER_STATE_VALUE_ENABLED"
"MODIFIER_STATE_UNSELECTABLE" "MODIFIER_STATE_VALUE_ENABLED"
"MODIFIER_STATE_NOT_ON_MINIMAP" "MODIFIER_STATE_VALUE_ENABLED"
"MODIFIER_STATE_NO_HEALTH_BAR" "MODIFIER_STATE_VALUE_ENABLED"
"MODIFIER_STATE_NO_UNIT_COLLISION" "MODIFIER_STATE_VALUE_ENABLED"
}
"Properties"
{
"MODIFIER_PROPERTY_INCOMING_DAMAGE_PERCENTAGE" "-100"
}
}
}
}
"ability_shop"
{
"ID" "9002"
"BaseClass" "ability_datadriven"
"AbilityTextureName" "custom/rubick_empty1"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_PASSIVE | DOTA_ABILITY_BEHAVIOR_HIDDEN"
"AbilityType" "DOTA_ABILITY_TYPE_HIDDEN"
"MaxLevel" "1"
// "Modifiers"
// {
// "shop_unit"
// {
// "Passive" "1"
// "IsHidden" "1"
// "States"
// {
// "MODIFIER_STATE_NOT_ON_MINIMAP" "MODIFIER_STATE_VALUE_ENABLED"
// "MODIFIER_STATE_NO_HEALTH_BAR" "MODIFIER_STATE_VALUE_ENABLED"
// "MODIFIER_STATE_NO_UNIT_COLLISION" "MODIFIER_STATE_VALUE_ENABLED"
// "MODIFIER_STATE_ROOTED" "MODIFIER_STATE_VALUE_ENABLED"
// }
// }
// }
}
"ability_touhoutd_release_tower"
{
"ID" "9003"
"BaseClass" "ability_datadriven"
"AbilityTextureName" "touhoutd/release_tower"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_UNIT_TARGET | DOTA_ABILITY_BEHAVIOR_IMMEDIATE"
"AbilityUnitTargetType" "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_BASIC"
"AbilityUnitTargetTeam" "DOTA_UNIT_TARGET_TEAM_FRIENDLY"
"MaxLevel" "1"
"AbilityCastAnimation" "ACT_DOTA_CAST_ABILITY_3"
"AbilityCooldown" "0"
"AbilityManaCost" "0"
// Stats
// ----------------------------------------------------------------
"AbilityCastRange" "1000"
"precache"
{
"particle" "particles/econ/items/clockwerk/clockwerk_paraflare/clockwerk_para_rocket_flare_explosion.vpcf"
"particle" "particles/heroes/alice/ability_alice_ex_release.vpcf"
"soundfile" "soundevents/thdots_hero_sounds/thdots_alice_sounds.vsndevts"
}
"OnSpellStart"
{
"FireSound"
{
"EffectName" "Sound_THTD.ability_touhoutd_release_tower"
"Target" "CASTER"
}
"RunScript"
{
"ScriptFile" "scripts/vscripts/abilities/abilityCommon.lua"
"Function" "OnTouhouReleaseTowerSpellStart"
"Target" "TARGET"
}
}
}
"ability_touhoutd_blink"
{
"ID" "9004"
"BaseClass" "ability_datadriven"
"AbilityTextureName" "touhoutd/blink"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_POINT"
"AbilityManaCost" "0"
"MaxLevel" "1"
"AbilityCooldown" "0"
"OnSpellStart"
{
"FireSound"
{
"EffectName" "Sound_THTD.ability_touhoutd_blink.Start"
"Target" "CASTER"
}
"FireSound"
{
"EffectName" "Sound_THTD.ability_touhoutd_blink"
"Target" "CASTER"
}
"RunScript"
{
"Target" "POINT"
"ScriptFile" "scripts/vscripts/abilities/abilityCommon.lua"
"Function" "BlinkToPoint"
}
}
}
"ability_touhoutd_kill"
{
"ID" "9005"
"BaseClass" "ability_datadriven"
"AbilityTextureName" "ability_collection_power"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_UNIT_TARGET"
"AbilityUnitTargetType" "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_BASIC"
"AbilityUnitTargetTeam" "DOTA_UNIT_TARGET_TEAM_ENEMY"
"AbilityUnitDamageType" "DAMAGE_TYPE_PURE"
"MaxLevel" "1"
"AbilityCastAnimation" "ACT_DOTA_CAST_ABILITY_3"
"AbilityCooldown" "50.0"
"AbilityManaCost" "0"
// Stats
// ----------------------------------------------------------------
"AbilityCastRange" "1000"
"OnSpellStart"
{
"RunScript"
{
"ScriptFile" "scripts/vscripts/abilities/abilityCommon.lua"
"Function" "OnKillUnitSpellStart"
"Target" "TARGET"
}
}
}
"ability_touhoutd_ex_up"
{
"ID" "9006"
"BaseClass" "ability_datadriven"
"AbilityTextureName" "touhoutd/power_buff"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_UNIT_TARGET | DOTA_ABILITY_BEHAVIOR_IMMEDIATE"
"AbilityUnitTargetType" "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_BASIC"
"AbilityUnitTargetTeam" "DOTA_UNIT_TARGET_TEAM_FRIENDLY"
"MaxLevel" "1"
"AbilityCastAnimation" "ACT_DOTA_CAST_ABILITY_3"
"AbilityCooldown" "0"
"AbilityManaCost" "0"
// Stats
// ----------------------------------------------------------------
"AbilityCastRange" "1000"
"precache"
{
"particle" "particles/econ/items/clockwerk/clockwerk_paraflare/clockwerk_para_rocket_flare_explosion.vpcf"
}
"OnSpellStart"
{
"RunScript"
{
"ScriptFile" "scripts/vscripts/abilities/abilityCommon.lua"
"Function" "OnTouhoutdExUp"
"Target" "TARGET"
}
}
"Modifiers"
{
"modifier_hero_effect_think"
{
"Passive" "1"
"IsHidden" "1"
"ThinkInterval" "9.0"
"States"
{
//"MODIFIER_STATE_NOT_ON_MINIMAP" "MODIFIER_STATE_VALUE_ENABLED"
"MODIFIER_STATE_NO_HEALTH_BAR" "MODIFIER_STATE_VALUE_ENABLED"
}
"OnIntervalThink"
{
"RunScript"
{
"ScriptFile" "scripts/vscripts/abilities/abilityCommon.lua"
"Function" "OnIntervalThinkHeroEffect"
}
}
}
}
}
"ability_touhoutd_buy_normal_card"
{
"ID" "9008"
"BaseClass" "ability_datadriven"
"AbilityTextureName" "touhoutd/buy_normal_card"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_NO_TARGET | DOTA_ABILITY_BEHAVIOR_IMMEDIATE"
"AbilityUnitTargetType" "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_BASIC"
"AbilityCooldown" "0.3"
"MaxLevel" "1"
"AbilityManaCost" "0"
"AbilityGoldCost" "500"
"OnSpellStart"
{
"RunScript"
{
"ScriptFile" "scripts/vscripts/abilities/abilityCommon.lua"
"Function" "DrawNormalCard"
}
}
}
"ability_touhoutd_buy_senior_card"
{
"ID" "9009"
"BaseClass" "ability_datadriven"
"AbilityTextureName" "touhoutd/buy_senior_card"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_NO_TARGET | DOTA_ABILITY_BEHAVIOR_IMMEDIATE"
"AbilityUnitTargetType" "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_BASIC"
"AbilityCooldown" "0.3"
"MaxLevel" "1"
"AbilityManaCost" "0"
"AbilityGoldCost" "2500"
"OnSpellStart"
{
"RunScript"
{
"ScriptFile" "scripts/vscripts/abilities/abilityCommon.lua"
"Function" "DrawSeniorCard"
}
}
}
"ability_touhoutd_sort_item"
{
"ID" "9509"
"BaseClass" "ability_datadriven"
"AbilityTextureName" "touhoutd/sort_item"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_NO_TARGET | DOTA_ABILITY_BEHAVIOR_IMMEDIATE"
"AbilityCooldown" "5.0"
"MaxLevel" "1"
"AbilityManaCost" "0"
"OnSpellStart"
{
"RunScript"
{
"ScriptFile" "scripts/vscripts/abilities/abilityCommon.lua"
"Function" "SortItem"
}
}
}
"ability_touhoutd_shop_wave_1"
{
"ID" "9010"
"BaseClass" "ability_datadriven"
"AbilityTextureName" "item_3018"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_NO_TARGET | DOTA_ABILITY_BEHAVIOR_IMMEDIATE"
"AbilityCooldown" "2.0"
"MaxLevel" "1"
"AbilityManaCost" "0"
"AbilityGoldCost" "10000"
"OnSpellStart"
{
"RunScript"
{
"ScriptFile" "scripts/vscripts/abilities/abilityCommon.lua"
"Function" "SkipWave"
"AddWave" "%add_wave"
"ItemName" "初级异变"
}
}
"AbilitySpecial"
{
"01"
{
"var_type" "FIELD_INTEGER"
"cost" "10000"
}
"02"
{
"var_type" "FIELD_INTEGER"
"add_wave" "20"
}
}
}
"ability_touhoutd_shop_wave_2"
{
"ID" "9510"
"BaseClass" "ability_datadriven"
"AbilityTextureName" "item_3031"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_NO_TARGET | DOTA_ABILITY_BEHAVIOR_IMMEDIATE | DOTA_ABILITY_BEHAVIOR_AUTOCAST"
"AbilityCooldown" "2.0"
"MaxLevel" "2"
"AbilityManaCost" "0"
"AbilityGoldCost" "30000 0"
"OnSpellStart"
{
"RunScript"
{
"ScriptFile" "scripts/vscripts/abilities/abilityCommon.lua"
"Function" "SkipWave"
"AddWave" "%add_wave"
"ItemName" "高级异变"
}
}
"Modifiers"
{
"modifier_shop_wave_2_autocast_think"
{
"Passive" "1"
"IsHidden" "1"
"ThinkInterval" "0.15"
"OnIntervalThink"
{
"RunScript"
{
"ScriptFile" "scripts/vscripts/abilities/abilityCommon.lua"
"Function" "OnIntervalThinkAutoCast"
}
}
}
}
"AbilitySpecial"
{
"01"
{
"var_type" "FIELD_INTEGER"
"cost" "30000 0"
}
"02"
{
"var_type" "FIELD_INTEGER"
"count" "0 1"
}
"03"
{
"var_type" "FIELD_INTEGER"
"add_wave" "100"
}
}
}
"ability_touhoutd_shop_wave_3"
{
"ID" "9610"
"BaseClass" "ability_datadriven"
"AbilityTextureName" "item_3011"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_NO_TARGET | DOTA_ABILITY_BEHAVIOR_IMMEDIATE | DOTA_ABILITY_BEHAVIOR_AUTOCAST"
"AbilityCooldown" "2.0"
"MaxLevel" "2"
"AbilityManaCost" "0"
"AbilityGoldCost" "90000 0"
"OnSpellStart"
{
"RunScript"
{
"ScriptFile" "scripts/vscripts/abilities/abilityCommon.lua"
"Function" "SkipWave"
"AddWave" "%add_wave"
"ItemName" "终级异变"
}
}
"Modifiers"
{
"modifier_shop_wave_3_autocast_think"
{
"Passive" "1"
"IsHidden" "1"
"ThinkInterval" "0.15"
"OnIntervalThink"
{
"RunScript"
{
"ScriptFile" "scripts/vscripts/abilities/abilityCommon.lua"
"Function" "OnIntervalThinkAutoCast"
}
}
}
}
"AbilitySpecial"
{
"01"
{
"var_type" "FIELD_INTEGER"
"cost" "90000 0"
}
"02"
{
"var_type" "FIELD_INTEGER"
"count" "0 3"
}
"03"
{
"var_type" "FIELD_INTEGER"
"add_wave" "500"
}
}
}
"ability_touhoutd_shop_roll"
{
"ID" "9511"
"BaseClass" "ability_datadriven"
"AbilityTextureName" "touhoutd/shop_roll"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_NO_TARGET | DOTA_ABILITY_BEHAVIOR_IMMEDIATE"
"AbilityUnitTargetType" "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_BASIC"
"AbilityCooldown" "5.0"
"MaxLevel" "3"
"AbilityManaCost" "0"
"AbilityGoldCost" "2000"
"OnSpellStart"
{
"RunScript"
{
"ScriptFile" "scripts/vscripts/abilities/abilityCommon.lua"
"Function" "RollCard"
}
}
"AbilitySpecial"
{
"01"
{
"var_type" "FIELD_INTEGER"
"card_count" "3 4 5"
}
"02"
{
"var_type" "FIELD_INTEGER"
"cost" "2000"
}
}
}
"ability_touhoutd_shop_buy_egg_level_1"
{
"ID" "9012"
"BaseClass" "ability_datadriven"
"AbilityTextureName" "touhoutd/buy_egg_level_1"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_NO_TARGET | DOTA_ABILITY_BEHAVIOR_IMMEDIATE"
"AbilityUnitTargetType" "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_BASIC"
"AbilityCooldown" "0.3"
"MaxLevel" "1"
"AbilityManaCost" "0"
"AbilityGoldCost" "1000"
"OnSpellStart"
{
"RunScript"
{
"ScriptFile" "scripts/vscripts/abilities/abilityCommon.lua"
"Function" "BuyEgg"
"item_name" "item_1003"
}
}
"AbilitySpecial"
{
"01"
{
"var_type" "FIELD_INTEGER"
"cost" "1000"
}
}
}
"ability_touhoutd_shop_buy_egg_level_2"
{
"ID" "9013"
"BaseClass" "ability_datadriven"
"AbilityTextureName" "touhoutd/buy_egg_level_2"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_NO_TARGET | DOTA_ABILITY_BEHAVIOR_IMMEDIATE"
"AbilityUnitTargetType" "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_BASIC"
"AbilityCooldown" "0.3"
"MaxLevel" "1"
"AbilityManaCost" "0"
"AbilityGoldCost" "1800"
"OnSpellStart"
{
"RunScript"
{
"ScriptFile" "scripts/vscripts/abilities/abilityCommon.lua"
"Function" "BuyEgg"
"item_name" "item_1004"
}
}
"AbilitySpecial"
{
"01"
{
"var_type" "FIELD_INTEGER"
"cost" "1800"
}
}
}
"ability_touhoutd_shop_buy_egg_level_3"
{
"ID" "9014"
"BaseClass" "ability_datadriven"
"AbilityTextureName" "touhoutd/buy_egg_level_3"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_NO_TARGET | DOTA_ABILITY_BEHAVIOR_IMMEDIATE"
"AbilityUnitTargetType" "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_BASIC"
"AbilityCooldown" "0.3"
"MaxLevel" "1"
"AbilityManaCost" "0"
"AbilityGoldCost" "7200"
"OnSpellStart"
{
"RunScript"
{
"ScriptFile" "scripts/vscripts/abilities/abilityCommon.lua"
"Function" "BuyEgg"
"item_name" "item_1005"
}
}
"AbilitySpecial"
{
"01"
{
"var_type" "FIELD_INTEGER"
"cost" "7200"
}
}
}
"ability_touhoutd_shop_buy_egg_level_4"
{
"ID" "9015"
"BaseClass" "ability_datadriven"
"AbilityTextureName" "touhoutd/buy_egg_level_4"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_NO_TARGET | DOTA_ABILITY_BEHAVIOR_IMMEDIATE"
"AbilityUnitTargetType" "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_BASIC"
"AbilityCooldown" "0.3"
"MaxLevel" "1"
"AbilityManaCost" "0"
"AbilityGoldCost" "35000"
"OnSpellStart"
{
"RunScript"
{
"ScriptFile" "scripts/vscripts/abilities/abilityCommon.lua"
"Function" "BuyEgg"
"item_name" "item_1006"
}
}
"AbilitySpecial"
{
"01"
{
"var_type" "FIELD_INTEGER"
"cost" "35000"
}
}
}
"ability_touhoutd_close_star"
{
"ID" "9016"
"BaseClass" "ability_datadriven"
"AbilityTextureName" "touhoutd/close_star"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_NO_TARGET | DOTA_ABILITY_BEHAVIOR_IMMEDIATE"
"AbilityUnitTargetType" "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_BASIC"
"AbilityCooldown" "1"
"MaxLevel" "1"
"AbilityManaCost" "0"
"OnSpellStart"
{
"RunScript"
{
"Target" "TARGET"
"ScriptFile" "scripts/vscripts/abilities/abilityCommon.lua"
"Function" "CloseStar"
}
}
}
"ability_touhoutd_star_up"
{
"ID" "9017"
"BaseClass" "ability_datadriven"
"AbilityTextureName" "touhoutd/star_up"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_NO_TARGET | DOTA_ABILITY_BEHAVIOR_IMMEDIATE"
"AbilityUnitTargetType" "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_BASIC"
"AbilityCooldown" "1"
// Stats
// ----------------------------------------------------------------
"AbilityManaCost" "0"
"OnSpellStart"
{
"RunScript"
{
"Target" "TARGET"
"ScriptFile" "scripts/vscripts/abilities/abilityCommon.lua"
"Function" "StarUp"
}
}
}
"ability_touhoutd_exp_up"
{
"ID" "9018"
"BaseClass" "ability_datadriven"
"AbilityTextureName" "touhoutd/exp_up"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_NO_TARGET | DOTA_ABILITY_BEHAVIOR_IMMEDIATE"
"AbilityUnitTargetType" "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_BASIC"
"AbilityCooldown" "1"
// Stats
// ----------------------------------------------------------------
"AbilityManaCost" "0"
"OnSpellStart"
{
"RunScript"
{
"Target" "TARGET"
"ScriptFile" "scripts/vscripts/abilities/abilityCommon.lua"
"Function" "ExpUp"
}
}
}
"tt1"
{
"ID" "9032"
"BaseClass" "ability_datadriven"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_PASSIVE"
"AbilityType" "DOTA_ABILITY_TYPE_ATTRIBUTES"
}
"tt2"
{
"ID" "9033"
"BaseClass" "ability_datadriven"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_PASSIVE"
"AbilityType" "DOTA_ABILITY_TYPE_ATTRIBUTES"
}
"tt3"
{
"ID" "9034"
"BaseClass" "ability_datadriven"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_PASSIVE"
"AbilityType" "DOTA_ABILITY_TYPE_ATTRIBUTES"
}
"tt4"
{
"ID" "9035"
"BaseClass" "ability_datadriven"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_PASSIVE"
"AbilityType" "DOTA_ABILITY_TYPE_ATTRIBUTES"
}
"tt5"
{
"ID" "9036"
"BaseClass" "ability_datadriven"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_PASSIVE"
"AbilityType" "DOTA_ABILITY_TYPE_ATTRIBUTES"
}
"tt6"
{
"ID" "9037"
"BaseClass" "ability_datadriven"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_PASSIVE"
"AbilityType" "DOTA_ABILITY_TYPE_ATTRIBUTES"
}
"tt7"
{
"ID" "9038"
"BaseClass" "ability_datadriven"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_PASSIVE"
"AbilityType" "DOTA_ABILITY_TYPE_ATTRIBUTES"
}
"tt8"
{
"ID" "9039"
"BaseClass" "ability_datadriven"
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_PASSIVE"
"AbilityType" "DOTA_ABILITY_TYPE_ATTRIBUTES"
}
}

View File

@@ -0,0 +1,436 @@
"DOTAAbilities"
{
// 不能附加原技能不存在的属性
//=================================================================================================================
// Luna: Moon Glaives
//=================================================================================================================
"luna_moon_glaive"
{
// General
//-------------------------------------------------------------------------------------------------------------
"ID" "5223" // unique ID number for this ability. Do not change this once established or it will invalidate collected stats.
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_PASSIVE"
"SpellImmunityType" "SPELL_IMMUNITY_ENEMIES_YES"
"AbilitySound" "Hero_Luna.MoonGlaive.Impact"
// Special
//-------------------------------------------------------------------------------------------------------------
"AbilitySpecial"
{
"01"
{
"var_type" "FIELD_INTEGER"
"range" "500"
}
"02"
{
"var_type" "FIELD_INTEGER"
"bounces" "6 6 6 6"
}
"03"
{
"var_type" "FIELD_INTEGER"
"damage_reduction_percent" "35"
}
}
"AbilityCastAnimation" "ACT_DOTA_CAST_ABILITY_2"
}
//=================================================================================================================
// Death Prophet: Exorcism
//=================================================================================================================
"death_prophet_exorcism"
{
// General
//-------------------------------------------------------------------------------------------------------------
"ID" "5093" // unique ID number for this ability. Do not change this once established or it will invalidate collected stats.
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_NO_TARGET"
"AbilityType" "DOTA_ABILITY_TYPE_ULTIMATE"
"AbilityUnitDamageType" "DAMAGE_TYPE_PHYSICAL"
"SpellImmunityType" "SPELL_IMMUNITY_ENEMIES_YES"
"SpellDispellableType" "SPELL_DISPELLABLE_NO"
"FightRecapLevel" "2"
"AbilitySound" "Hero_DeathProphet.Exorcism.Cast"
// Casting
//-------------------------------------------------------------------------------------------------------------
"AbilityCastPoint" "0.2"
"AbilityCastAnimation" "ACT_DOTA_CAST_ABILITY_4"
// Time
//-------------------------------------------------------------------------------------------------------------
"AbilityCooldown" "30"
"AbilityDuration" "30"
// Cost
//-------------------------------------------------------------------------------------------------------------
"AbilityManaCost" "0"
// Special
//-------------------------------------------------------------------------------------------------------------
"AbilitySpecial"
{
"01"
{
"var_type" "FIELD_INTEGER"
"radius" "1000"
}
"02"
{
"var_type" "FIELD_INTEGER"
"spirits" "5 10 15 20 30"
"LinkedSpecialBonus" "special_bonus_unique_death_prophet"
}
"03"
{
"var_type" "FIELD_INTEGER"
"spirit_speed" "750"
}
"04"
{
"var_type" "FIELD_INTEGER"
"max_distance" "2000"
}
"05"
{
"var_type" "FIELD_INTEGER"
"give_up_distance" "2000"
}
"06"
{
"var_type" "FIELD_INTEGER"
"min_damage" "750"
}
"07"
{
"var_type" "FIELD_INTEGER"
"max_damage" "750"
}
"08"
{
"var_type" "FIELD_INTEGER"
"heal_percent" "4"
}
"09"
{
"var_type" "FIELD_INTEGER"
"average_damage" "750"
}
"10"
{
"var_type" "FIELD_FLOAT"
"ghost_spawn_rate" "0.15"
}
}
}
//=================================================================================================================
// Faceless Void: Time Lock
//=================================================================================================================
"faceless_void_time_lock"
{
// General
//-------------------------------------------------------------------------------------------------------------
"ID" "5184" // unique ID number for this ability. Do not change this once established or it will invalidate collected stats.
"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_PASSIVE"
"AbilityUnitDamageType" "DAMAGE_TYPE_PHYSICAL"
"SpellImmunityType" "SPELL_IMMUNITY_ENEMIES_YES"
"SpellDispellableType" "SPELL_DISPELLABLE_YES_STRONG"
"AbilitySound" "Hero_FacelessVoid.TimeLockImpact"
// Stats
//-------------------------------------------------------------------------------------------------------------
"AbilityModifierSupportBonus" "25"
// Special
//-------------------------------------------------------------------------------------------------------------
"AbilitySpecial"
{
"01"
{
"var_type" "FIELD_FLOAT"
"duration" "1.0"
}
"02"
{
"var_type" "FIELD_FLOAT"
"duration_creep" "2.0"
}
"03"
{
"var_type" "FIELD_INTEGER"
"chance_pct" "5 10"
}
"04"
{
"var_type" "FIELD_INTEGER"
"bonus_damage" "20"
"LinkedSpecialBonus" "special_bonus_unique_faceless_void_3"
}
}
"AbilityCastAnimation" "ACT_DOTA_CAST_ABILITY_3"
}
"item_recipe_hand_of_midas" "REMOVE"
"item_mithril_hammer" "REMOVE"
"item_yasha" "REMOVE"
"item_diffusal_blade_2" "REMOVE"
"item_black_king_bar" "REMOVE"
"item_recipe_dagon_4" "REMOVE"
"item_wind_lace" "REMOVE"
"item_helm_of_the_dominator" "REMOVE"
"item_ogre_axe" "REMOVE"
"item_diffusal_blade" "REMOVE"
"item_relic" "REMOVE"
"item_recipe_satanic" "REMOVE"
"item_octarine_core" "REMOVE"
"item_recipe_vladmir" "REMOVE"
"item_lifesteal" "REMOVE"
"item_point_booster" "REMOVE"
"item_iron_talon" "REMOVE"
"item_dragon_lance" "REMOVE"
"item_sobi_mask" "REMOVE"
"item_magic_wand" "REMOVE"
"item_recipe_monkey_king_bar" "REMOVE"
"item_buckler" "REMOVE"
"item_tango_single" "REMOVE"
"item_recipe_veil_of_discord" "REMOVE"
"item_boots" "REMOVE"
"item_recipe_sheepstick" "REMOVE"
"item_recipe_crimson_guard" "REMOVE"
"item_recipe_ring_of_basilius" "REMOVE"
"item_river_painter4" "REMOVE"
"item_hurricane_pike" "REMOVE"
"item_cheese" "REMOVE"
"item_magic_stick" "REMOVE"
"item_wraith_band" "REMOVE"
"item_oblivion_staff" "REMOVE"
"item_recipe_ancient_janggo" "REMOVE"
"item_sphere" "REMOVE"
"item_invis_sword" "REMOVE"
"item_recipe_ward_dispenser" "REMOVE"
"item_dagon_4" "REMOVE"
"item_mantle" "REMOVE"
"item_recipe_rapier" "REMOVE"
"item_ethereal_blade" "REMOVE"
"item_recipe_helm_of_the_dominator" "REMOVE"
"item_dagon" "REMOVE"
"item_blades_of_attack" "REMOVE"
"item_tranquil_boots" "REMOVE"
"item_belt_of_strength" "REMOVE"
"item_recipe_iron_talon" "REMOVE"
"item_recipe_hood_of_defiance" "REMOVE"
"item_radiance" "REMOVE"
"item_recipe_travel_boots" "REMOVE"
"item_recipe_refresher" "REMOVE"
"item_blight_stone" "REMOVE"
"item_dagon_2" "REMOVE"
"item_greater_crit" "REMOVE"
"item_chainmail" "REMOVE"
"item_helm_of_iron_will" "REMOVE"
"item_recipe_heavens_halberd" "REMOVE"
"item_recipe_radiance" "REMOVE"
"item_guardian_greaves" "REMOVE"
"item_refresher" "REMOVE"
"item_recipe_abyssal_blade" "REMOVE"
"item_echo_sabre" "REMOVE"
"item_glimmer_cape" "REMOVE"
"item_bfury" "REMOVE"
"item_river_painter" "REMOVE"
"item_broadsword" "REMOVE"
"item_river_painter2" "REMOVE"
"item_vitality_booster" "REMOVE"
"item_cyclone" "REMOVE"
"item_recipe_sange" "REMOVE"
"item_recipe_necronomicon" "REMOVE"
"item_recipe_octarine_core" "REMOVE"
"item_headdress" "REMOVE"
"item_heavens_halberd" "REMOVE"
"item_recipe_bloodstone" "REMOVE"
"item_recipe_butterfly" "REMOVE"
"item_gloves" "REMOVE"
"item_arcane_boots" "REMOVE"
"item_null_talisman" "REMOVE"
"item_recipe_urn_of_shadows" "REMOVE"
"item_lesser_crit" "REMOVE"
"item_dust" "REMOVE"
"item_orb_of_venom" "REMOVE"
"item_blade_of_alacrity" "REMOVE"
"item_staff_of_wizardry" "REMOVE"
"item_sange" "REMOVE"
"item_recipe_aether_lens" "REMOVE"
"item_infused_raindrop" "REMOVE"
"item_reaver" "REMOVE"
"item_shadow_amulet" "REMOVE"
"item_dagon_5" "REMOVE"
"item_rod_of_atos" "REMOVE"
"item_ward_sentry" "REMOVE"
"item_necronomicon_2" "REMOVE"
"item_boots_of_elves" "REMOVE"
"item_hyperstone" "REMOVE"
"item_recipe_lesser_crit" "REMOVE"
"item_recipe_bracer" "REMOVE"
"item_cloak" "REMOVE"
"item_platemail" "REMOVE"
"item_energy_booster" "REMOVE"
"item_ward_observer" "REMOVE"
"item_recipe_maelstrom" "REMOVE"
"item_blade_mail" "REMOVE"
"item_recipe_rod_of_atos" "REMOVE"
"item_recipe_dagon_5" "REMOVE"
"item_crimson_guard" "REMOVE"
"item_flask" "REMOVE"
"item_recipe_ring_of_aquila" "REMOVE"
"item_travel_boots" "REMOVE"
"item_mystic_staff" "REMOVE"
"item_recipe_tranquil_boots" "REMOVE"
"item_recipe_phase_boots" "REMOVE"
"item_lotus_orb" "REMOVE"
"item_recipe_blade_mail" "REMOVE"
"item_bloodstone" "REMOVE"
"item_recipe_diffusal_blade_2" "REMOVE"
"item_recipe_vanguard" "REMOVE"
"item_recipe_magic_wand" "REMOVE"
"item_aether_lens" "REMOVE"
"item_demon_edge" "REMOVE"
"item_recipe_necronomicon_2" "REMOVE"
"item_void_stone" "REMOVE"
"item_recipe_black_king_bar" "REMOVE"
"item_clarity" "REMOVE"
"item_bracer" "REMOVE"
"item_butterfly" "REMOVE"
"item_pers" "REMOVE"
"item_aegis" "REMOVE"
"item_river_painter5" "REMOVE"
"item_recipe_shivas_guard" "REMOVE"
"item_soul_ring" "REMOVE"
"item_phase_boots" "REMOVE"
"item_bottle" "REMOVE"
"item_recipe_wraith_band" "REMOVE"
"item_recipe_poor_mans_shield" "REMOVE"
"item_river_painter3" "REMOVE"
"item_pipe" "REMOVE"
"item_sange_and_yasha" "REMOVE"
"item_faerie_fire" "REMOVE"
"item_ring_of_health" "REMOVE"
"item_recipe_ethereal_blade" "REMOVE"
"item_recipe_medallion_of_courage" "REMOVE"
"item_circlet" "REMOVE"
"item_ghost" "REMOVE"
"item_recipe_orchid" "REMOVE"
"item_recipe_echo_sabre" "REMOVE"
"item_recipe_basher" "REMOVE"
"item_ward_dispenser" "REMOVE"
"item_recipe_bloodthorn" "REMOVE"
//"item_courier" "REMOVE"
"item_talisman_of_evasion" "REMOVE"
"item_shivas_guard" "REMOVE"
"item_recipe_skadi" "REMOVE"
"item_recipe_silver_edge" "REMOVE"
"item_quarterstaff" "REMOVE"
"item_river_painter7" "REMOVE"
"item_assault" "REMOVE"
"item_recipe_invis_sword" "REMOVE"
"item_sheepstick" "REMOVE"
"item_river_painter6" "REMOVE"
"item_recipe_dagon_3" "REMOVE"
"item_robe" "REMOVE"
"item_recipe_force_staff" "REMOVE"
"item_smoke_of_deceit" "REMOVE"
"item_recipe_cyclone" "REMOVE"
"item_claymore" "REMOVE"
"item_dagon_3" "REMOVE"
"item_travel_boots_2" "REMOVE"
"item_recipe_diffusal_blade" "REMOVE"
"item_recipe_pipe" "REMOVE"
"item_vladmir" "REMOVE"
"item_urn_of_shadows" "REMOVE"
"item_heart" "REMOVE"
"item_recipe_glimmer_cape" "REMOVE"
"item_force_staff" "REMOVE"
"item_javelin" "REMOVE"
"item_recipe_guardian_greaves" "REMOVE"
"item_ring_of_regen" "REMOVE"
"item_blink" "REMOVE"
"item_branches" "REMOVE"
"item_recipe_null_talisman" "REMOVE"
"item_recipe_assault" "REMOVE"
"item_ring_of_protection" "REMOVE"
"item_eagle" "REMOVE"
"item_medallion_of_courage" "REMOVE"
"item_skadi" "REMOVE"
"item_recipe_yasha" "REMOVE"
"item_silver_edge" "REMOVE"
"item_recipe_dragon_lance" "REMOVE"
//"item_tpscroll" "REMOVE"
"item_tango" "REMOVE"
"item_recipe_pers" "REMOVE"
"item_recipe_travel_boots_2" "REMOVE"
"item_orchid" "REMOVE"
"item_ring_of_basilius" "REMOVE"
"item_ultimate_orb" "REMOVE"
"item_gauntlets" "REMOVE"
"item_bloodthorn" "REMOVE"
"item_recipe_soul_booster" "REMOVE"
"item_recipe_arcane_boots" "REMOVE"
"item_recipe_headdress" "REMOVE"
"item_recipe_soul_ring" "REMOVE"
"item_satanic" "REMOVE"
"item_recipe_mjollnir" "REMOVE"
//"item_flying_courier" "REMOVE"
"item_quelling_blade" "REMOVE"
//"item_enchanted_mango" "REMOVE"
"item_manta" "REMOVE"
"item_mjollnir" "REMOVE"
"item_recipe_necronomicon_3" "REMOVE"
"item_necronomicon_3" "REMOVE"
"item_recipe_power_treads" "REMOVE"
"item_poor_mans_shield" "REMOVE"
"item_moon_shard" "REMOVE"
"item_recipe_ultimate_scepter" "REMOVE"
"item_ultimate_scepter" "REMOVE"
"item_necronomicon" "REMOVE"
"item_power_treads" "REMOVE"
"item_recipe_sphere" "REMOVE"
"item_recipe_lotus_orb" "REMOVE"
"item_vanguard" "REMOVE"
"item_recipe_mekansm" "REMOVE"
"item_recipe_heart" "REMOVE"
"item_recipe_dagon" "REMOVE"
"item_veil_of_discord" "REMOVE"
"item_tome_of_knowledge" "REMOVE"
"item_recipe_hurricane_pike" "REMOVE"
"item_solar_crest" "REMOVE"
"item_soul_booster" "REMOVE"
"item_hood_of_defiance" "REMOVE"
"item_rapier" "REMOVE"
"item_mekansm" "REMOVE"
"item_mask_of_madness" "REMOVE"
"item_recipe_armlet" "REMOVE"
"item_recipe_buckler" "REMOVE"
"item_recipe_bfury" "REMOVE"
"item_hand_of_midas" "REMOVE"
"item_maelstrom" "REMOVE"
"item_recipe_desolator" "REMOVE"
"item_monkey_king_bar" "REMOVE"
"item_recipe_dagon_2" "REMOVE"
"item_gem" "REMOVE"
"item_armlet" "REMOVE"
"item_abyssal_blade" "REMOVE"
"item_recipe_sange_and_yasha" "REMOVE"
"item_recipe_greater_crit" "REMOVE"
"item_stout_shield" "REMOVE"
"item_recipe_mask_of_madness" "REMOVE"
"item_slippers" "REMOVE"
"item_basher" "REMOVE"
"item_recipe_manta" "REMOVE"
"item_ancient_janggo" "REMOVE"
"item_recipe_solar_crest" "REMOVE"
"item_recipe_oblivion_staff" "REMOVE"
"item_recipe_moon_shard" "REMOVE"
"item_desolator" "REMOVE"
"item_ring_of_aquila" "REMOVE"
}

202
scripts/npc/npc_heroes_custom.txt Executable file
View File

@@ -0,0 +1,202 @@
// 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"
{
"npc_dota_hero_reimu"
{
"override_hero" "npc_dota_hero_lina"
"AbilityLayout" "1"
"Ability1" "ability_touhoutd_release_tower"
"Ability2" "ability_touhoutd_blink"
"Ability3" "ability_touhoutd_kill"
"Ability4" "ability_touhoutd_buy_normal_card"
"Ability5" "ability_touhoutd_buy_senior_card"
"Ability6" "ability_touhoutd_ex_up"
"Ability7" "ability_touhoutd_sort_item"
"Ability8" "ability_touhoutd_close_star"
"Ability9" "generic_hidden"
"Ability10" "generic_hidden"
"Ability11" "generic_hidden"
"Ability12" "generic_hidden"
"Ability13" "generic_hidden"
"Ability14" "generic_hidden"
"Ability15" "generic_hidden"
"Ability16" "generic_hidden"
"Ability17" "tt7"
"Ability18" "tt8"
"Ability19" "tt5"
"Ability20" "tt6"
"Ability21" "tt3"
"Ability22" "tt4"
"Ability23" "tt1"
"Ability24" "tt2"
//"Carry" "核心"
//"Support" "辅助"
//"Nuker" "爆发"
//"Disabler" "控制"
//"Jungler" "打野"
//"Durable" "耐久"
//"Escape" "逃生"
//"LaneSupport" "对线辅助"
//"Pusher" "推进"
//"Initiator" "先手"
//"Role" "Carry,Support,Nuker,Disabler,Jungler,Durable,Escape,LaneSupport,Pusher,Initiator"
"Role" "Carry,Nuker,Disabler,Jungler,Escape,Pusher,Initiator"
"Rolelevels" "1,3,2,1,0,1,2"
"ModelScale" "1.4"
"HealthBarOffset" "320"
"MinimapIcon" "npc_dota_hero_lina"
"Model" "models/new_touhou_model/reimu/reimu.vmdl"
"AttackAnimationPoint" "0.1"
// 攻击前摇
"AttackRate" "3.0"
// 攻击速度
"ArmorPhysical" "0"
// 物理护甲
"AttackDamageMin" "4"
// 最大攻击力
"AttackDamageMax" "5"
// 最小攻击力
"AttributeBaseStrength" "1"
// 基础力量
"AttributeStrengthGain" "0"
// 每级增加的力量,力量成长
"AttributeBaseAgility" "1"
// 基础敏捷
"AttributeAgilityGain" "0"
// 每级增加的敏捷,敏捷成长
"AttributeBaseIntelligence" "1"
// 基础智力
"AttributeIntelligenceGain" "0"
// 每级增加的智力,智力成长
"MovementSpeed" "550"
// 基础移动速度
"MovementTurnRate" "1.0"
// 转身速度
"StatusHealth" "135"
// 基础生命值
"StatusHealthRegen" "2.0"
// 基础生命恢复
"StatusMana" "60"
// 基础魔法值
"StatusManaRegen" "0.9"
// 基础魔法恢复
"VisionDaytimeRange" "1050"
// 白天视野大小
"VisionNighttimeRange" "700"
// 晚上视野大小
"DisableWearables" "1"
}
"npc_dota_hero_reimu2"
{
"override_hero" "npc_dota_hero_juggernaut"
"AbilityLayout" "1"
"Ability1" "ability_touhoutd_release_tower"
"Ability2" "ability_touhoutd_blink"
"Ability3" "ability_touhoutd_kill"
"Ability4" "ability_touhoutd_buy_normal_card"
"Ability5" "ability_touhoutd_buy_senior_card"
"Ability6" "ability_touhoutd_ex_up"
"Ability7" "ability_touhoutd_sort_item"
"Ability8" "ability_touhoutd_close_star"
"Ability9" "generic_hidden"
"Ability10" "generic_hidden"
"Ability11" "generic_hidden"
"Ability12" "generic_hidden"
"Ability13" "generic_hidden"
"Ability14" "generic_hidden"
"Ability15" "generic_hidden"
"Ability16" "generic_hidden"
"Ability17" "tt7"
"Ability18" "tt8"
"Ability19" "tt5"
"Ability20" "tt6"
"Ability21" "tt3"
"Ability22" "tt4"
"Ability23" "tt1"
"Ability24" "tt2"
//"Carry" "核心"
//"Support" "辅助"
//"Nuker" "爆发"
//"Disabler" "控制"
//"Jungler" "打野"
//"Durable" "耐久"
//"Escape" "逃生"
//"LaneSupport" "对线辅助"
//"Pusher" "推进"
//"Initiator" "先手"
//"Role" "Carry,Support,Nuker,Disabler,Jungler,Durable,Escape,LaneSupport,Pusher,Initiator"
"Role" "Carry,Nuker,Disabler,Jungler,Escape,Pusher,Initiator"
"Rolelevels" "1,3,2,1,0,1,2"
"ModelScale" "1.4"
"MinimapIcon" "npc_dota_hero_juggernaut" //无效
"AttackAnimationPoint" "0.1"
// 攻击前摇
"AttackRate" "3.0"
// 攻击速度
"ArmorPhysical" "0"
// 物理护甲
"AttackDamageMin" "4"
// 最大攻击力
"AttackDamageMax" "5"
// 最小攻击力
"AttributeBaseStrength" "1"
// 基础力量
"AttributeStrengthGain" "0"
// 每级增加的力量,力量成长
"AttributeBaseAgility" "1"
// 基础敏捷
"AttributeAgilityGain" "0"
// 每级增加的敏捷,敏捷成长
"AttributeBaseIntelligence" "1"
// 基础智力
"AttributeIntelligenceGain" "0"
// 每级增加的智力,智力成长
"MovementSpeed" "550"
// 基础移动速度
"MovementTurnRate" "1.0"
// 转身速度
"StatusHealth" "135"
// 基础生命值
"StatusHealthRegen" "2.0"
// 基础生命恢复
"StatusMana" "60"
// 基础魔法值
"StatusManaRegen" "0.9"
// 基础魔法恢复
"VisionDaytimeRange" "1050"
// 白天视野大小
"VisionNighttimeRange" "700"
// 晚上视野大小
"DisableWearables" "1"
// 边界设置
//----------------------------------------------------------------
"BoundsHullName" "DOTA_HULL_SIZE_SMALL" // 碰撞边界类型,以下为单位尺寸参数:
// 值 Hammer中的单位半径
// DOTA_HULL_SIZE_SMALL 8
// DOTA_HULL_SIZE_REGULAR 16
// DOTA_HULL_SIZE_SIEGE 16
// DOTA_HULL_SIZE_HERO 24
// DOTA_HULL_SIZE_HUGE 80
// DOTA_HULL_SIZE_BUILDING 81
// DOTA_HULL_SIZE_FILLER 96
// DOTA_HULL_SIZE_BARRACKS 144
// DOTA_HULL_SIZE_TOWER 144
"RingRadius" "60" // 选择圈半径
"HealthBarOffset" "320" // 血条高度,缺省值为 "-1",意味着使用默认的模型高度
}
}

4907
scripts/npc/npc_items_custom.txt Executable file

File diff suppressed because it is too large Load Diff

1381
scripts/npc/npc_units_custom.txt Executable file

File diff suppressed because it is too large Load Diff

644
scripts/npc/portraits.txt Executable file
View File

@@ -0,0 +1,644 @@
"Portraits"
{
"Version" "1"
"DefaultActivity" "ACT_DOTA_IDLE"
"default"
{
"PortraitLightPosition" "202.70 -23.15 308.17"
"PortraitLightAngles" "54.79 171.70 0.00"
"PortraitLightFOV" "88"
"PortraitLightDistance" "343"
"PortraitLightColor" "190 190 190"
"PortraitShadowColor" "74 74 74"
"PortraitShadowScale" "5.000000"
"PortraitAmbientColor" "79 108 108"
"PortraitAmbientScale" "5.000000"
"PortraitSpecularColor" "251 74 84"
"PortraitBackgroundTexture" "materials/vgui/hud/heroportraits/portraitbackground_moon.vmat"
"PortraitBackgroundColor1" "1 1 1"
"PortraitBackgroundColor2" "1 1 1"
"PortraitBackgroundColor3" "1 1 1"
"PortraitBackgroundColor4" "1 1 1"
"PortraitLightScale" "4.500000"
"PortraitGroundShadowScale" "1.500000"
"PortraitAmbientDirection" "-79.070 -84.150 -25.320"
"PortraitAnimationActivity" "ACT_DOTA_IDLE"
"cameras"
{
"default"
{
"PortraitPosition" "170.0 -74.0 130.0"
"PortraitAngles" "0.0 155.0 0.0"
"PortraitFOV" "16"
}
}
}
"models/thd_hero/lily_white/lily_white.vmdl"
{
"PortraitLightPosition" "202.70 -23.15 308.17"
"PortraitLightAngles" "54.79 171.70 0.00"
"PortraitLightFOV" "88"
"PortraitLightDistance" "343"
"PortraitLightColor" "190 190 190"
"PortraitShadowColor" "74 74 74"
"PortraitShadowScale" "5.000000"
"PortraitAmbientColor" "79 108 108"
"PortraitAmbientScale" "5.000000"
"PortraitSpecularColor" "251 74 84"
"PortraitBackgroundTexture" "materials/vgui/hud/heroportraits/portraitbackground_moon.vmat"
"PortraitBackgroundColor1" "1 1 1"
"PortraitBackgroundColor2" "1 1 1"
"PortraitBackgroundColor3" "1 1 1"
"PortraitBackgroundColor4" "1 1 1"
"PortraitLightScale" "4.500000"
"PortraitGroundShadowScale" "1.500000"
"PortraitAmbientDirection" "-79.070 -84.150 -25.320"
"PortraitAnimationActivity" "ACT_DOTA_IDLE"
"cameras"
{
"default"
{
"PortraitPosition" "210.0 -95.0 250.0"
"PortraitAngles" "30.0 155.0 10.0"
"PortraitFOV" "16"
}
}
}
"models/new_touhou_model/reimu/reimu.vmdl"
{
"PortraitLightPosition" "202.70 -23.15 308.17"
"PortraitLightAngles" "54.79 171.70 0.00"
"PortraitLightFOV" "88"
"PortraitLightDistance" "343"
"PortraitLightColor" "190 190 190"
"PortraitShadowColor" "74 74 74"
"PortraitShadowScale" "5.000000"
"PortraitAmbientColor" "79 108 108"
"PortraitAmbientScale" "5.000000"
"PortraitSpecularColor" "251 74 84"
"PortraitBackgroundTexture" "materials/vgui/hud/heroportraits/portraitbackground_moon.vmat"
"PortraitBackgroundColor1" "1 1 1"
"PortraitBackgroundColor2" "1 1 1"
"PortraitBackgroundColor3" "1 1 1"
"PortraitBackgroundColor4" "1 1 1"
"PortraitLightScale" "4.500000"
"PortraitGroundShadowScale" "1.500000"
"PortraitAmbientDirection" "-79.070 -84.150 -25.320"
"PortraitAnimationActivity" "ACT_DOTA_IDLE"
"cameras"
{
"default"
{
"PortraitPosition" "140.0 -63.0 187.0"
"PortraitAngles" "0.0 155.0 0.0"
"PortraitFOV" "16"
}
}
}
"models/new_touhou_model/flandre/flandre.vmdl"
{
"PortraitLightPosition" "202.70 -23.15 308.17"
"PortraitLightAngles" "54.79 171.70 0.00"
"PortraitLightFOV" "88"
"PortraitLightDistance" "343"
"PortraitLightColor" "190 190 190"
"PortraitShadowColor" "74 74 74"
"PortraitShadowScale" "5.000000"
"PortraitAmbientColor" "79 108 108"
"PortraitAmbientScale" "5.000000"
"PortraitSpecularColor" "251 74 84"
"PortraitBackgroundTexture" "materials/vgui/hud/heroportraits/portraitbackground_moon.vmat"
"PortraitBackgroundColor1" "1 1 1"
"PortraitBackgroundColor2" "1 1 1"
"PortraitBackgroundColor3" "1 1 1"
"PortraitBackgroundColor4" "1 1 1"
"PortraitLightScale" "4.500000"
"PortraitGroundShadowScale" "1.500000"
"PortraitAmbientDirection" "-79.070 -84.150 -25.320"
"PortraitAnimationActivity" "ACT_DOTA_IDLE"
"cameras"
{
"default"
{
"PortraitPosition" "150.0 -37.0 170.0"
"PortraitAngles" "5.0 165.0 0.0"
"PortraitFOV" "16"
}
}
}
"models/new_touhou_model/remilia/remilia.vmdl"
{
"PortraitLightPosition" "202.70 -23.15 308.17"
"PortraitLightAngles" "54.79 171.70 0.00"
"PortraitLightFOV" "88"
"PortraitLightDistance" "343"
"PortraitLightColor" "190 190 190"
"PortraitShadowColor" "74 74 74"
"PortraitShadowScale" "5.000000"
"PortraitAmbientColor" "79 108 108"
"PortraitAmbientScale" "5.000000"
"PortraitSpecularColor" "251 74 84"
"PortraitBackgroundTexture" "materials/vgui/hud/heroportraits/portraitbackground_moon.vmat"
"PortraitBackgroundColor1" "1 1 1"
"PortraitBackgroundColor2" "1 1 1"
"PortraitBackgroundColor3" "1 1 1"
"PortraitBackgroundColor4" "1 1 1"
"PortraitLightScale" "4.500000"
"PortraitGroundShadowScale" "1.500000"
"PortraitAmbientDirection" "-79.070 -84.150 -25.320"
"PortraitAnimationActivity" "ACT_DOTA_IDLE"
"cameras"
{
"default"
{
"PortraitPosition" "140.0 -33.0 153.0"
"PortraitAngles" "5.0 165.0 0.0"
"PortraitFOV" "16"
}
}
}
"models/new_touhou_model/marisa/marisa.vmdl"
{
"PortraitLightPosition" "202.70 -23.15 308.17"
"PortraitLightAngles" "54.79 171.70 0.00"
"PortraitLightFOV" "88"
"PortraitLightDistance" "343"
"PortraitLightColor" "190 190 190"
"PortraitShadowColor" "74 74 74"
"PortraitShadowScale" "5.000000"
"PortraitAmbientColor" "79 108 108"
"PortraitAmbientScale" "5.000000"
"PortraitSpecularColor" "251 74 84"
"PortraitBackgroundTexture" "materials/vgui/hud/heroportraits/portraitbackground_moon.vmat"
"PortraitBackgroundColor1" "1 1 1"
"PortraitBackgroundColor2" "1 1 1"
"PortraitBackgroundColor3" "1 1 1"
"PortraitBackgroundColor4" "1 1 1"
"PortraitLightScale" "4.500000"
"PortraitGroundShadowScale" "1.500000"
"PortraitAmbientDirection" "-79.070 -84.150 -25.320"
"PortraitAnimationActivity" "ACT_DOTA_IDLE"
"cameras"
{
"default"
{
"PortraitPosition" "135.0 -42.0 200.0"
"PortraitAngles" "10.0 160.0 0.0"
"PortraitFOV" "16"
}
}
}
"models/new_touhou_model/cirno/cirno.vmdl"
{
"PortraitLightPosition" "202.70 -23.15 308.17"
"PortraitLightAngles" "54.79 171.70 0.00"
"PortraitLightFOV" "88"
"PortraitLightDistance" "343"
"PortraitLightColor" "190 190 190"
"PortraitShadowColor" "74 74 74"
"PortraitShadowScale" "5.000000"
"PortraitAmbientColor" "79 108 108"
"PortraitAmbientScale" "5.000000"
"PortraitSpecularColor" "251 74 84"
"PortraitBackgroundTexture" "materials/vgui/hud/heroportraits/portraitbackground_moon.vmat"
"PortraitBackgroundColor1" "1 1 1"
"PortraitBackgroundColor2" "1 1 1"
"PortraitBackgroundColor3" "1 1 1"
"PortraitBackgroundColor4" "1 1 1"
"PortraitLightScale" "4.500000"
"PortraitGroundShadowScale" "1.500000"
"PortraitAmbientDirection" "-79.070 -84.150 -25.320"
"PortraitAnimationActivity" "ACT_DOTA_IDLE"
"cameras"
{
"default"
{
"PortraitPosition" "140.0 -20.0 190.0"
"PortraitAngles" "8.0 170.0 0.0"
"PortraitFOV" "16"
}
}
}
"models/new_touhou_model/cirno/ex/ex_cirno.vmdl"
{
"PortraitLightPosition" "202.70 -23.15 308.17"
"PortraitLightAngles" "54.79 171.70 0.00"
"PortraitLightFOV" "88"
"PortraitLightDistance" "343"
"PortraitLightColor" "190 190 190"
"PortraitShadowColor" "74 74 74"
"PortraitShadowScale" "5.000000"
"PortraitAmbientColor" "79 108 108"
"PortraitAmbientScale" "5.000000"
"PortraitSpecularColor" "251 74 84"
"PortraitBackgroundTexture" "materials/vgui/hud/heroportraits/portraitbackground_moon.vmat"
"PortraitBackgroundColor1" "1 1 1"
"PortraitBackgroundColor2" "1 1 1"
"PortraitBackgroundColor3" "1 1 1"
"PortraitBackgroundColor4" "1 1 1"
"PortraitLightScale" "4.500000"
"PortraitGroundShadowScale" "1.500000"
"PortraitAmbientDirection" "-79.070 -84.150 -25.320"
"PortraitAnimationActivity" "ACT_DOTA_IDLE"
"cameras"
{
"default"
{
"PortraitPosition" "140.0 -25.0 150.0"
"PortraitAngles" "8.0 170.0 0.0"
"PortraitFOV" "16"
}
}
}
"models/new_touhou_model/sakuya/sakuya.vmdl"
{
"PortraitLightPosition" "202.70 -23.15 308.17"
"PortraitLightAngles" "54.79 171.70 0.00"
"PortraitLightFOV" "88"
"PortraitLightDistance" "343"
"PortraitLightColor" "190 190 190"
"PortraitShadowColor" "74 74 74"
"PortraitShadowScale" "5.000000"
"PortraitAmbientColor" "79 108 108"
"PortraitAmbientScale" "5.000000"
"PortraitSpecularColor" "251 74 84"
"PortraitBackgroundTexture" "materials/vgui/hud/heroportraits/portraitbackground_moon.vmat"
"PortraitBackgroundColor1" "1 1 1"
"PortraitBackgroundColor2" "1 1 1"
"PortraitBackgroundColor3" "1 1 1"
"PortraitBackgroundColor4" "1 1 1"
"PortraitLightScale" "4.500000"
"PortraitGroundShadowScale" "1.500000"
"PortraitAmbientDirection" "-79.070 -84.150 -25.320"
"PortraitAnimationActivity" "ACT_DOTA_IDLE"
"cameras"
{
"default"
{
"PortraitPosition" "130.0 -55.0 190.0"
"PortraitAngles" "10.0 155.0 0.0"
"PortraitFOV" "16"
}
}
}
"models/new_touhou_model/youmu/youmu.vmdl"
{
"PortraitLightPosition" "202.70 -23.15 308.17"
"PortraitLightAngles" "54.79 171.70 0.00"
"PortraitLightFOV" "88"
"PortraitLightDistance" "343"
"PortraitLightColor" "190 190 190"
"PortraitShadowColor" "74 74 74"
"PortraitShadowScale" "5.000000"
"PortraitAmbientColor" "79 108 108"
"PortraitAmbientScale" "5.000000"
"PortraitSpecularColor" "251 74 84"
"PortraitBackgroundTexture" "materials/vgui/hud/heroportraits/portraitbackground_moon.vmat"
"PortraitBackgroundColor1" "1 1 1"
"PortraitBackgroundColor2" "1 1 1"
"PortraitBackgroundColor3" "1 1 1"
"PortraitBackgroundColor4" "1 1 1"
"PortraitLightScale" "4.500000"
"PortraitGroundShadowScale" "1.500000"
"PortraitAmbientDirection" "-79.070 -84.150 -25.320"
"PortraitAnimationActivity" "ACT_DOTA_IDLE"
"cameras"
{
"default"
{
"PortraitPosition" "130.0 -21.0 150.0"
"PortraitAngles" "5.0 170.0 0.0"
"PortraitFOV" "16"
}
}
}
"models/new_touhou_model/tenshi/tenshi.vmdl"
{
"PortraitLightPosition" "202.70 -23.15 308.17"
"PortraitLightAngles" "54.79 171.70 0.00"
"PortraitLightFOV" "88"
"PortraitLightDistance" "343"
"PortraitLightColor" "190 190 190"
"PortraitShadowColor" "74 74 74"
"PortraitShadowScale" "5.000000"
"PortraitAmbientColor" "79 108 108"
"PortraitAmbientScale" "5.000000"
"PortraitSpecularColor" "251 74 84"
"PortraitBackgroundTexture" "materials/vgui/hud/heroportraits/portraitbackground_moon.vmat"
"PortraitBackgroundColor1" "1 1 1"
"PortraitBackgroundColor2" "1 1 1"
"PortraitBackgroundColor3" "1 1 1"
"PortraitBackgroundColor4" "1 1 1"
"PortraitLightScale" "4.500000"
"PortraitGroundShadowScale" "1.500000"
"PortraitAmbientDirection" "-79.070 -84.150 -25.320"
"PortraitAnimationActivity" "ACT_DOTA_IDLE"
"cameras"
{
"default"
{
"PortraitPosition" "140.0 -15.0 165.0"
"PortraitAngles" "10.0 170.0 0.0"
"PortraitFOV" "16"
}
}
}
"models/new_touhou_model/patchouli/patchouli.vmdl"
{
"PortraitLightPosition" "202.70 -23.15 308.17"
"PortraitLightAngles" "54.79 171.70 0.00"
"PortraitLightFOV" "88"
"PortraitLightDistance" "343"
"PortraitLightColor" "190 190 190"
"PortraitShadowColor" "74 74 74"
"PortraitShadowScale" "5.000000"
"PortraitAmbientColor" "79 108 108"
"PortraitAmbientScale" "5.000000"
"PortraitSpecularColor" "251 74 84"
"PortraitBackgroundTexture" "materials/vgui/hud/heroportraits/portraitbackground_moon.vmat"
"PortraitBackgroundColor1" "1 1 1"
"PortraitBackgroundColor2" "1 1 1"
"PortraitBackgroundColor3" "1 1 1"
"PortraitBackgroundColor4" "1 1 1"
"PortraitLightScale" "4.500000"
"PortraitGroundShadowScale" "1.500000"
"PortraitAmbientDirection" "-79.070 -84.150 -25.320"
"PortraitAnimationActivity" "ACT_DOTA_IDLE"
"cameras"
{
"default"
{
"PortraitPosition" "130.0 -33.0 175.0"
"PortraitAngles" "10.0 165.0 0.0"
"PortraitFOV" "16"
}
}
}
"models/new_touhou_model/yuuka/yuuka.vmdl"
{
"PortraitLightPosition" "202.70 -23.15 308.17"
"PortraitLightAngles" "54.79 171.70 0.00"
"PortraitLightFOV" "88"
"PortraitLightDistance" "343"
"PortraitLightColor" "190 190 190"
"PortraitShadowColor" "74 74 74"
"PortraitShadowScale" "5.000000"
"PortraitAmbientColor" "79 108 108"
"PortraitAmbientScale" "5.000000"
"PortraitSpecularColor" "251 74 84"
"PortraitBackgroundTexture" "materials/vgui/hud/heroportraits/portraitbackground_moon.vmat"
"PortraitBackgroundColor1" "1 1 1"
"PortraitBackgroundColor2" "1 1 1"
"PortraitBackgroundColor3" "1 1 1"
"PortraitBackgroundColor4" "1 1 1"
"PortraitLightScale" "4.500000"
"PortraitGroundShadowScale" "1.500000"
"PortraitAmbientDirection" "-79.070 -84.150 -25.320"
"PortraitAnimationActivity" "ACT_DOTA_IDLE"
"cameras"
{
"default"
{
"PortraitPosition" "130.0 -29.0 180.0"
"PortraitAngles" "10.0 165.0 0.0"
"PortraitFOV" "16"
}
}
}
"models/new_touhou_model/junko/junko.vmdl"
{
"PortraitLightPosition" "202.70 -23.15 308.17"
"PortraitLightAngles" "54.79 171.70 0.00"
"PortraitLightFOV" "88"
"PortraitLightDistance" "343"
"PortraitLightColor" "190 190 190"
"PortraitShadowColor" "74 74 74"
"PortraitShadowScale" "5.000000"
"PortraitAmbientColor" "79 108 108"
"PortraitAmbientScale" "5.000000"
"PortraitSpecularColor" "251 74 84"
"PortraitBackgroundTexture" "materials/vgui/hud/heroportraits/portraitbackground_moon.vmat"
"PortraitBackgroundColor1" "1 1 1"
"PortraitBackgroundColor2" "1 1 1"
"PortraitBackgroundColor3" "1 1 1"
"PortraitBackgroundColor4" "1 1 1"
"PortraitLightScale" "4.500000"
"PortraitGroundShadowScale" "1.500000"
"PortraitAmbientDirection" "-79.070 -84.150 -25.320"
"PortraitAnimationActivity" "ACT_DOTA_IDLE"
"cameras"
{
"default"
{
"PortraitPosition" "150.0 -50.0 235.0"
"PortraitAngles" "5.0 160.0 0.0"
"PortraitFOV" "16"
}
}
}
"models/new_touhou_model/hecatia/hecatia.vmdl"
{
"PortraitLightPosition" "202.70 -23.15 308.17"
"PortraitLightAngles" "54.79 171.70 0.00"
"PortraitLightFOV" "88"
"PortraitLightDistance" "343"
"PortraitLightColor" "190 190 190"
"PortraitShadowColor" "74 74 74"
"PortraitShadowScale" "5.000000"
"PortraitAmbientColor" "79 108 108"
"PortraitAmbientScale" "5.000000"
"PortraitSpecularColor" "251 74 84"
"PortraitBackgroundTexture" "materials/vgui/hud/heroportraits/portraitbackground_moon.vmat"
"PortraitBackgroundColor1" "1 1 1"
"PortraitBackgroundColor2" "1 1 1"
"PortraitBackgroundColor3" "1 1 1"
"PortraitBackgroundColor4" "1 1 1"
"PortraitLightScale" "4.500000"
"PortraitGroundShadowScale" "1.500000"
"PortraitAmbientDirection" "-79.070 -84.150 -25.320"
"PortraitAnimationActivity" "ACT_DOTA_IDLE"
"cameras"
{
"default"
{
"PortraitPosition" "130.0 -20.0 245.0"
"PortraitAngles" "10.0 170.0 0.0"
"PortraitFOV" "16"
}
}
}
"models/new_touhou_model/hecatia/hecatia_moon/hecatia_moon.vmdl"
{
"PortraitLightPosition" "202.70 -23.15 308.17"
"PortraitLightAngles" "54.79 171.70 0.00"
"PortraitLightFOV" "88"
"PortraitLightDistance" "343"
"PortraitLightColor" "190 190 190"
"PortraitShadowColor" "74 74 74"
"PortraitShadowScale" "5.000000"
"PortraitAmbientColor" "79 108 108"
"PortraitAmbientScale" "5.000000"
"PortraitSpecularColor" "251 74 84"
"PortraitBackgroundTexture" "materials/vgui/hud/heroportraits/portraitbackground_moon.vmat"
"PortraitBackgroundColor1" "1 1 1"
"PortraitBackgroundColor2" "1 1 1"
"PortraitBackgroundColor3" "1 1 1"
"PortraitBackgroundColor4" "1 1 1"
"PortraitLightScale" "4.500000"
"PortraitGroundShadowScale" "1.500000"
"PortraitAmbientDirection" "-79.070 -84.150 -25.320"
"PortraitAnimationActivity" "ACT_DOTA_IDLE"
"cameras"
{
"default"
{
"PortraitPosition" "130.0 -20.0 245.0"
"PortraitAngles" "10.0 170.0 0.0"
"PortraitFOV" "16"
}
}
}
"models/new_touhou_model/hecatia/hecatia_earth/hecatia_earth.vmdl"
{
"PortraitLightPosition" "202.70 -23.15 308.17"
"PortraitLightAngles" "54.79 171.70 0.00"
"PortraitLightFOV" "88"
"PortraitLightDistance" "343"
"PortraitLightColor" "190 190 190"
"PortraitShadowColor" "74 74 74"
"PortraitShadowScale" "5.000000"
"PortraitAmbientColor" "79 108 108"
"PortraitAmbientScale" "5.000000"
"PortraitSpecularColor" "251 74 84"
"PortraitBackgroundTexture" "materials/vgui/hud/heroportraits/portraitbackground_moon.vmat"
"PortraitBackgroundColor1" "1 1 1"
"PortraitBackgroundColor2" "1 1 1"
"PortraitBackgroundColor3" "1 1 1"
"PortraitBackgroundColor4" "1 1 1"
"PortraitLightScale" "4.500000"
"PortraitGroundShadowScale" "1.500000"
"PortraitAmbientDirection" "-79.070 -84.150 -25.320"
"PortraitAnimationActivity" "ACT_DOTA_IDLE"
"cameras"
{
"default"
{
"PortraitPosition" "130.0 -20.0 245.0"
"PortraitAngles" "10.0 170.0 0.0"
"PortraitFOV" "16"
}
}
}
"models/new_touhou_model/yukari/yukari.vmdl"
{
"PortraitLightPosition" "202.70 -23.15 308.17"
"PortraitLightAngles" "54.79 171.70 0.00"
"PortraitLightFOV" "88"
"PortraitLightDistance" "343"
"PortraitLightColor" "190 190 190"
"PortraitShadowColor" "74 74 74"
"PortraitShadowScale" "5.000000"
"PortraitAmbientColor" "79 108 108"
"PortraitAmbientScale" "5.000000"
"PortraitSpecularColor" "251 74 84"
"PortraitBackgroundTexture" "materials/vgui/hud/heroportraits/portraitbackground_moon.vmat"
"PortraitBackgroundColor1" "1 1 1"
"PortraitBackgroundColor2" "1 1 1"
"PortraitBackgroundColor3" "1 1 1"
"PortraitBackgroundColor4" "1 1 1"
"PortraitLightScale" "4.500000"
"PortraitGroundShadowScale" "1.500000"
"PortraitAmbientDirection" "-79.070 -84.150 -25.320"
"PortraitAnimationActivity" "ACT_DOTA_IDLE"
"cameras"
{
"default"
{
"PortraitPosition" "130.0 5.0 188.0"
"PortraitAngles" "10.0 180.0 0.0"
"PortraitFOV" "16"
}
}
}
"models/new_touhou_model/satori/satori.vmdl"
{
"PortraitLightPosition" "202.70 -23.15 308.17"
"PortraitLightAngles" "54.79 171.70 0.00"
"PortraitLightFOV" "88"
"PortraitLightDistance" "343"
"PortraitLightColor" "190 190 190"
"PortraitShadowColor" "74 74 74"
"PortraitShadowScale" "5.000000"
"PortraitAmbientColor" "79 108 108"
"PortraitAmbientScale" "5.000000"
"PortraitSpecularColor" "251 74 84"
"PortraitBackgroundTexture" "materials/vgui/hud/heroportraits/portraitbackground_moon.vmat"
"PortraitBackgroundColor1" "1 1 1"
"PortraitBackgroundColor2" "1 1 1"
"PortraitBackgroundColor3" "1 1 1"
"PortraitBackgroundColor4" "1 1 1"
"PortraitLightScale" "4.500000"
"PortraitGroundShadowScale" "1.500000"
"PortraitAmbientDirection" "-79.070 -84.150 -25.320"
"PortraitAnimationActivity" "ACT_DOTA_IDLE"
"cameras"
{
"default"
{
"PortraitPosition" "130.0 -45.0 150.0"
"PortraitAngles" "8.0 160.0 0.0"
"PortraitFOV" "16"
}
}
}
"models/new_touhou_model/aya/aya.vmdl"
{
"PortraitLightPosition" "202.70 -23.15 308.17"
"PortraitLightAngles" "54.79 171.70 0.00"
"PortraitLightFOV" "88"
"PortraitLightDistance" "343"
"PortraitLightColor" "190 190 190"
"PortraitShadowColor" "74 74 74"
"PortraitShadowScale" "5.000000"
"PortraitAmbientColor" "79 108 108"
"PortraitAmbientScale" "5.000000"
"PortraitSpecularColor" "251 74 84"
"PortraitBackgroundTexture" "materials/vgui/hud/heroportraits/portraitbackground_moon.vmat"
"PortraitBackgroundColor1" "1 1 1"
"PortraitBackgroundColor2" "1 1 1"
"PortraitBackgroundColor3" "1 1 1"
"PortraitBackgroundColor4" "1 1 1"
"PortraitLightScale" "4.500000"
"PortraitGroundShadowScale" "1.500000"
"PortraitAmbientDirection" "-79.070 -84.150 -25.320"
"PortraitAnimationActivity" "ACT_DOTA_IDLE"
"cameras"
{
"default"
{
"PortraitPosition" "110.0 -52.0 205.0"
"PortraitAngles" "10.0 155.0 0.0"
"PortraitFOV" "16"
}
}
}
}

9
scripts/npc/power_table.txt Executable file
View File

@@ -0,0 +1,9 @@
power_table
{
"1" "C5ACAE78E6C903A2D10A368DA001B0E1F979209C8FEB23FD6F59F7AA5129E41C6CCB3CA4DF3EC68D74D8C0C30B20F59D0E401D51849303F69E80050F81D58632334E18D668DDD266766200AE3AC5427A9EE2F8CFBAE585F46816B1659A001C7F04F52005DAADEC46CFD962B129B771004F9C91C56CDC87E092A9CC5AFD10830"
"2" "72602B5B2B92C28284D18A489BD59C3DDEFE023D5E98566B5B103069E46D5541BE6702B2DCC13F87E1C37CC4D9855D39FD58DA839CF66676CE9B3AC644EC6925E8274EDC6832A2140AF7EACE45D677B89511F70172EEFFF45F24B6A6808610D3AB12687B3CDA9582B30907C9477F02FA9FAD752A97BC10C93B82CE860A1F581"
"3" "BCA975B1304837210A4723C93CE06BAB65A9C95B15F8CE6CC605306DD62E6D90C262B27FE269A908D6DD67653F17BDC1038ADB84288BC006141A1BE88417E6467494152B5CE408A5A9D824A3AC6997CADEA94CE2C4BDA8F03C889160F85D5D148B46AC29569E0A6927D6B6EA0B68665371AAB85B9A4EB887820F09999CBFC8A"
"4" "AEEE7BA20EC94B7627E630298AC97FDFD738EB954B957B20C6409C5F2092A3D196CE38F5B210F1BF3DC7D948BE4B0351397DF3CCA2DF1FCD62E6035CE14C67BDB500DA3CBE387027A582F3D0C0CFE7B4337FB8624BA78CEFBF1841241BB7ACC9ABA8613F8701A049E6D86F9F1C4897A99D25134C3A170A8D16C0239E5113EBF"
"5" "BAB79E0AF12018BB71599692E34D3846437F89C9F34F4F2AC05192CD9D92FB2D293538F11E6FFD1FAA9ACCDA23EAF6835E5A3679092AB55123DA64DD4A0961547B3504D97ECD9E63FCCD5C44CC9B359A23AA82DF5DBF00AF88BD17B8CFC23AAFE756B47D6ECEED9F84121748B78AF5B05C56935AC59B0B8DD30EC9ECDBF1CE8"
"6" "844238644211529CA28915D50C54DF50AF800025E4A0036C8399182BDDC217047108454D4FBCCF754A9E2669D97FFC6B6E089610004138CE5B5A79F3601CC3142F82EB45E3395BB91430AC1885AB62286FAE8"
}

60
scripts/npc/shops.txt Executable file
View File

@@ -0,0 +1,60 @@
"dota_shops"
{
"consumables"
{
}
"attributes"
{
}
"weapons_armor"
{
}
"misc"
{
}
"basics"
{
}
"support"
{
}
"magics"
{
}
"weapons"
{
}
"defense"
{
}
"artifacts"
{
}
"sideshop1"
{
}
"sideshop2"
}
"secretshop"
{
}
"pregame"
{
}
}

414
scripts/npc/spawner.txt Executable file
View File

@@ -0,0 +1,414 @@
"Spawner"
{
"Attacking"
{
"Wave1"
{
"Unit" "creature_01"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave2"
{
"Unit" "creature_02"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave3"
{
"Unit" "creature_03"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave4"
{
"Unit" "creature_04"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave5"
{
"Unit" "creature_05"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave6"
{
"Unit" "creature_06"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave7"
{
"Unit" "creature_07"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave8"
{
"Unit" "creature_08"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave9"
{
"Unit" "creature_09"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave10"
{
"Unit" "creature_10"
"Times" "21"
"Count" "1"
"Interval" "1.6"
"BreakTime" "21"
}
"Wave11"
{
"Unit" "creature_11"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave12"
{
"Unit" "creature_12"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave13"
{
"Unit" "creature_13"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave14"
{
"Unit" "creature_14"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave15"
{
"Unit" "creature_15"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave16"
{
"Unit" "creature_16"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave17"
{
"Unit" "creature_17"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave18"
{
"Unit" "creature_18"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave19"
{
"Unit" "creature_19"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave20"
{
"Unit" "creature_20"
"Times" "21"
"Count" "1"
"Interval" "1.6"
"BreakTime" "21"
}
"Wave21"
{
"Unit" "creature_21"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave22"
{
"Unit" "creature_22"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave23"
{
"Unit" "creature_23"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave24"
{
"Unit" "creature_24"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave25"
{
"Unit" "creature_25"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave26"
{
"Unit" "creature_26"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave27"
{
"Unit" "creature_27"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave28"
{
"Unit" "creature_28"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave29"
{
"Unit" "creature_29"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave30"
{
"Unit" "creature_30"
"Times" "21"
"Count" "1"
"Interval" "1.6"
"BreakTime" "21"
}
"Wave31"
{
"Unit" "creature_31"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave32"
{
"Unit" "creature_32"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave33"
{
"Unit" "creature_33"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave34"
{
"Unit" "creature_34"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave35"
{
"Unit" "creature_35"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave36"
{
"Unit" "creature_36"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave37"
{
"Unit" "creature_37"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave38"
{
"Unit" "creature_38"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave39"
{
"Unit" "creature_39"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave40"
{
"Unit" "creature_40"
"Times" "21"
"Count" "1"
"Interval" "1.6"
"BreakTime" "21"
}
"Wave41"
{
"Unit" "creature_41"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave42"
{
"Unit" "creature_42"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave43"
{
"Unit" "creature_43"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave44"
{
"Unit" "creature_44"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave45"
{
"Unit" "creature_45"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave46"
{
"Unit" "creature_46"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave47"
{
"Unit" "creature_47"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave48"
{
"Unit" "creature_48"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave49"
{
"Unit" "creature_49"
"Times" "42"
"Count" "1"
"Interval" "0.8"
"BreakTime" "21"
}
"Wave50"
{
"Unit" "creature_50"
"Times" "21"
"Count" "1"
"Interval" "1.6"
"BreakTime" "100"
}
"Wave51"
{
"Unit" "creature_unlimited"
"Times" "20"
"Count" "1"
"Interval" "0.5"
"BreakTime" "15"
}
}
}

79
scripts/npc/tower.txt Executable file
View File

@@ -0,0 +1,79 @@
tower
{
"1" "C5ACAE43B5F15386980E2B84FA70F6AB9A7279D3C9C060EF390CFCC51163FE49278222D1CD208B84228592825D7AD58C720E0A5D9BA25E99CAC0057EE78995656C2C0A88679C8323313871E86D941E25CFB38F93FAA7D1B4341FE439F409182E1ED37A40F5EFCF4CB3A575DE3391374B388B848864BAC4B98CE09037EC548C5"
"2" "E381EC2A5A761217C0F49B491B65FD9A9D3A6049AFB9074B5DB59428407B1175BEF2E31728C18963E443E881B8022C0938C97F6688E33754CA9AD8A6F5BC6A6179C6281DA82623F1CC376FB8E072361C9355C285A7EB58E03BE09333F59165168E76CCFEF82F1407141F67C9477F52FFCBFE71AE6478F2787FB74AB7CE4FA97"
"3" "CDA57CEF3E1C374B501A2D997CB862FE39C5D85E15A9B91088053A72E8713CD28662B27FE249BB4C86D31D716440F4D4239BC6D370D49657634649BAC25FBC5A358A004E54EF54ACB19920B6F030CA94D5AF56F1DEF8D4AD33D09832A10549349A5BFC7515D7124F2CDCF2BC522D27577A8CB65CD14ED5DD965737D3A2E391F"
"4" "DBBE7BA20ECB4A6262D6D788CF6C4B4E9539FB617FC02B2633E46DFB15A71704174E8A955325458AECE759FFC98E5281F8DEE0CDD21A4C082213C5EDF52C922C54F66A889EBCA15221C6636654CE17D5E5BE9C365A239EAF8F58108509B3A9B9ABA8313F94F060CDA559CDFB794C424979B065CD4EE22A799795264B01A57FF"
"5" "B1B5DA56A57E44E1717982CEB4125E544C27A08FE34E1D109402BD8583C596266A3D75E6442BA80B8A8B83963F81FDDE571320170E2FA85479AB229525182503751E47EB3AFBEA6CE6E4134AD281428F3DE78B8803F25EB7839B1BAF948169B3B84CA26600C5B083DB394B0EF5D4A2A4555D9540C280049D9734C9C093EBD9D"
"6" "01C6BDC35671678D70E9A4F158C11D716B3001D486A1136A232C89EB3A6153E5414D76A81E0CBEE58A2E47C858DBB8EEAFCC87F14690298F4ECB2CF7550C72964F33DE41A56D6FC981D109BC84BC7298FF5E0F67EB0DDFDD9846ECF6B45B980ADA793FB805D50BEA8416473F766C4DB1988AEAC78B79EAD7AAC8385A7E7C081"
"7" "7C197E14927777514A9A293762D45BF4428F4FE4898683C3E121361CBE9F2D885E4B408EAF0EA3742FF045D0DFF7B8F6A4FBCB5E562769A4A6620CCB21C511F7A438637B9E10CCDCAC638E78F12BCEBCF7657791B19BD6644A7F6D30CC41DF8CBCDD56469756954CC2A8E14A76A18878284C111ED450EF50408E46BC0594BA9"
"8" "F5120F559A1CF94F2A401FDDBA7A547A20067CCE753B45F83448007CC670432BAFAD9579E048957A07DF4038BD66FB3A68118D4B876C5C3E464FF520C842FA287D3A0543D36CC7A01131D45BC262E16FA68F27385D5D9B4203A7E4B65D219DCC0EC14E2ECDA88F53664C608A597C14A8506FDBDF191D61123231EE9D2A03165"
"9" "EFA946EC8F1CBD5F9D703ED107EE78F8CA0DCF53EC44B6C0C508A218F7F423819D3DA6BF26520B252679041975F87852F37BC3526149FED678C36B86DDD477403FC4D4310F0ABD6D0630312284C38968F223ADDD99E0379C367E370990A28BD7A80923D4D90E14F327704FDBF093940C8861FF4D78F76C6E9584BF2D4ED7FD1"
"10" "D89CB38E28FAF3F35DB3B01E1EC7ABA55516EBF55CA7FD120C116A133C79146A4323A938C19A2EA4F40B5C1947AD8A693F271A028E92F06BA6999826FF6B1BEBE81920B671F171273340B576CD2A2F3CF78492703C668F154F8F23C9719624DC5F8AF809571F7A8A4724CE5AAF4008AE229A675F31D376CD48016DE5D16BD88"
"11" "312536A62C178B5080176B855CA4FE7AA95D2946DDE1D5B7F4FFAE1E14309C81E5CFA254B54A9711D7974B708367F310ED66D88C428E754531F039CE710435034B3797D8BF275089A204CBB62A2D4DD456B2E844A5C50E5AD825E7D40B7866A613BD59FF77E33CB17E3C67875A0EAF275EB83D429CB563C99B0FE6960FFE43E"
"12" "0044F7A2D6DE22CB664C1CF5CFE5BA5DFE4F78CF7854A5B7DE02FC0EE7C16C5194B0BB095D2385FE372F6BB7E3298349F14E32647E4ADE93B7D3DED70F6114A563A562AFF52BFAF3F2BCC7D797D7509EF298236D25B9D4AFDEC70268EEC1E5854877BACBF0E9F5311590A8FA7976FDA5FA2AB777CA543DFF44D7B36374CD909"
"13" "A81C506769FA643B84A4F540874BA37805FD4BE371A4D80287A1F7455A209170C276233CC2A51CEFEC40AD00DA2160C5142BB7B76436ACE8BE8C5B21A15B06A41E67628B9EE2DA3F18A4926976C1A74745C2D564CC4D17744FB055FC56273363BE28D24A3435FA6CB654BCE6C11456F39E7CC49D63F0E44992A05614BC62108"
"14" "39A035FF70FCE97BA8597C900947D50B4C10AD14A26F2AD718CE5B2133FFF00FFFABC39C88DA96FC2281E97D8292DDE68067D6E439750B24E075631BF8A03BB260B5D5D36423D32043579482C3446210E422D09AE14F51CA86ECB26A2E98CACC86EF3B2910808616411F48A0FD1905042081328AF563FA70E2FC16B549FDE03"
"15" "3E4F24956582E5348D646D78632DA2BD218A5526EFFD2F3BCEEE9ABDC10A983FDC87BED7E4227DD44E817E90E2AE33AC6D5A531FE65C87F39859ADFB8549DF2CC34E8E117CA5664801420B59B1D87DF8DADF470BFCE7078EF786B2DD8A56A12380F245F2471BAC526AC7E7EF5E96CFFC811CE9843B1856100E4B6F75BDE5A91"
"16" "4AAEC5080CDC9E1A3F1A81473FCE2A7ADFE6D2F6B243295A5E7C68A35AA63CEEF9B7256C0234EC120DDF0CC51CAAD6472E8C5A989DAF637A0D6077C5DA14AEF7DCE27A01CD30305672E3CF67A7CD638BE4957FD65676F65738A4CB48CA8540C81587E9DC28F2EE718BE985A587F7B90AECA5D9A9C6A5561554407FF25CCC6E3"
"17" "C027B36B42E44DB59014EA7928DE1C83857D35BCC40BEFE40F90CF2FDFB261D93354A00FC7E181FFF7CD1D51285ACEB2416CB8E92B03F164E9401C63D7A61E6313C73D079DEC0692030ACB491AAB9106F34D95E086632B209421B62979D6AEB3A4A658F56E7C3BD51DFBA5614C448DB754D5B4903161CB16E1729E561F6E7AF"
"18" "B2BF3435225E3189805DDE3EF7A738A26E0D739C9B4582344EC1640964FBD40CAB876E97D84CD4FF8E0C1F90C3CDC64DB8DCAD2E512B4DA8E463589CAD43FC8461B554B75BB403456E5FBDC940CB307686AB52CC46D31166B730B9E45F219C1E13C106E888F79217B8571F7F28DB76C2A90821F7EF25C5A112F59A0521E3E85"
"19" "FFBE4FF4601A1E1D7BF84CC43AF6F739BB0D5B854B5C0BCB8EAF56410753481E136C47C58F967F058C26D1AD0DCA66A412851B364E5F9BA74F91853AB25308C29133C2277456689A811687A8686421CFB8720090148A8CAF6B0F850576E78272D2CD112FAAD1FDC49544F6BFA4F8AA464BB12249FF5AB90383E5B01E1F03C96"
"20" "ACC3A5A58B8246372E9C1637E57B28418E86D684CA49AFF70BD0BC60B9212F53363813F8C1073179DFC3A05CA353D53B3D51EDA7779500023FAE66899AC71B46FFBE99B1CE31C003062A635F0274EE363A92AED3E0B2662A6EFB603AE69D454E853A85BB4D081D8423B91B77DAE7213C5775F6ED4DA728D2CE4AB5B6DF81FF3"
"21" "65ACD97A13D89204562613E3020AFE4D87147A1741C49F25DCCF3E3A74786A4C89172AD6AAD13362E93C8681F92BA51A1C57B5C9A85A3DC470271F132E802BFC56DB87BA270213334A15348A7C7B6084B46DAABD5CA73BA6EBCC4867C0323BB2FF8A57CA1EB35A121BBD2DE953E21C4796DB56F0C612473CE4DAA793AAAA8E1"
"22" "10B5E1011A8FDAFCA30BCD00D751F9E8DEB1AF884C2699E84826DCBCA83AFA23E3B619FBED0C6B569501BF11BD80C158E98699F81A725B58E8875DF714328EDD8BFB25D67060B5FA2D77FDB1E264B30881ED1675C43222176181D15919C2D651E80CC615DD03617C957019CCBF222EA560ABF22E55C2B068D3FFA12F0AB9C07"
"23" "FCBC3DC11D79FDD68F9D1BDFC379A273505A5D7C705F697A3C19590312D6FACED0465DF10C4A6AB624205EB4AA1CB99BC14A2721CED210D11FDC8E4C9D19B554A3576E1281A8D3E22DB3A9F3E283ABD7709D457B0A2AADA115568907BBE97BBEA2D8548D4AB0BBD0302E5A4AA7DECED0C23688C543DF1FB91DF589B9698A228"
"24" "531AF0451E524A3F084202E8CB489213E815FE4CF6DE5285A591562753DF685DAB87B42BB177F4CB02A6DAE0EFFD404DD1B517509593C6CF155E4FE5545EEFA5898C96A6E9A9B9D76DDF8D030F1DABE6C2E394E482149E2D93E3C93F1A58F88982C041F2330C0672685820013188B0252D77D048D3B703936792166C8D36F0A"
"25" "5205F0B7E924F748A00DDE6002827E02BCB822D30FBA9E2AD0A4D6DDB0BD51DBC4B98B490EE8EFB8A8E1F5A88135FD1E07790C54D22CF03A5C91C173F4493016347D2C211CBAC397A93492A5462602F246F23392C6593AAC3F5F0F572030C43FF35F8818E6E76066DE9FAB863A21A71FAAF909FF66CAD9CD21D68BF8050B6C8"
"26" "D3C0A9F479574D43EA51BEB26617BA372606EE9FAD73F69613560FDBD178561A9B73A966A96AA9C3013115493B4B9A33246CED7EE98CA14CBE5AA1C780188EB098E21B140C0EB7352BAFAF243D42C1A1D9020B33A0243370FDAB2B138FF1097FD6305CA43A20A7489735E62F155B4E887041CF6789DA6036625CD13E2BEC64D"
"27" "EC318BF7CF3D98C5E25BC3F86F67BC4FA678CB6697BCF32C191D405D885A7996ED100D5E32B5698A72995A57A2A12BF8D095AA16CFC950296287CB8C8AAB3ACF62165A0A4A90C95088E71DE010C7B4019A441B5D01FB17E8965984B4F109CBC3DA54EAD1F84CD76FC334DEB45C7F890962CEF241E213D6DAB79C158E03AAF19"
"28" "2D6399F4441978FF938E7575E003B0E8480EFDDE072E75F36D5D8BC6AD12FCBA14559C4D08DB419CFAAE3AAD575D833F438F09243530E5D05190089F80D8AE65DF78C2E4C677C60B2A652E41304F978AF5AF01F46168357BA2F7A751D6C8B84CEACBEF72AA10111ECDDE4B0245D3EB7F740BEFBA3DA7D2E45BF3FC061E2442A"
"29" "0493E43B4CF6EB62A3DAC7362A7EDC77A2525CEF985429BC09D4E995F2421703ACABB63C9E99FFF65A673DB6EA4404BD7BFCD2AC29A8B184EF37A33D23E0D409E4BF6FAF5B3C3E91D3D0B1B1C2A21E41149F98267997E26287F6B315FCD4ACCF18029615A8CAAB06D20393B716734435A2F678E9009771D68F061CD082D647A"
"30" "7EAFACB3600C5C37BEB1646298819A0042A0EAF24DAB46AF9D37DD07EFB7E88C1F3564A8D38CE0845F263F5E66D1E85C17659784A061B54E770079AFC2FD62E9F107553F6812D87C806ED7A81EC4A0A2CAA7576CA864CCAD8DFEFC78C81784A14A59AAC20184394CF94F0F7B46C44332EC9C419F62E663DD1F47AB57DD3CB86"
"31" "7B09560C3D38186D88E3567AE38798FFFAB6417141CAB58F85792FCA652E17C58575E1B74162CF1BA727D457A28E6284756FA167718866C7CAB0056CD4E1B2A8EB74E809DF4785B7B3AD6BB746DC164C66656C985C503075A23D0B7124F4A389A6EF350B76B638022E1DEB2A3B17EA19A9CDB020E8D359EF7B2519DF67D5177"
"32" "093B601E95165F36CF13E1595DED5E49E3F8E16B9E702D921A5A1AEFE4961ACE500132D8B038166CC653930CE467E35DCE50852E9735ADEDC5D00FC39CF72AE31A79FF8D46D6B0BD80331132BE873DE443FDD75332FDDAA72E173A26B0F8D5F61392CA0E79829266032E363866FAFF983699CA14F683E4E05AFEF2C8D262708"
"33" "C6EEA51BD7713B6C83858C737C42E9B7A574ED7A15C7D760D3979EFEECD9C97D06FFD8646F4536E9DF13D34B6D2484123BA9B237B129ABA4B00C73C03255DDA7BB90C570449A48F426CDAA81C37DD5556AC7BEA61851DFD782EED0ACB361BD0A4633943A9A7A3D56FE61DB5D2A92042BDF6EADBBC0D7CA268137408192E012D"
"34" "11887CECDD89AF77789D1BA72001B8BC0BF89B726D9A2AC9F45764D611778B598A9F8BFA9E00EAC4DE8136365C8BBBC15CFE98B48D4C64E8E0FD8EA126AAD88448C465D32DB900266CE9285E661848C4C6766B0091736952457BF85D66A00DFF27B5A8EEAC8B90C0B5A108CB518DEC51ADED5113CC5A14B0CDF8D2E0E065A96"
"35" "EF0059D522E73C5C70D0065DCA2FA3BC47B11BAB8DFE3D1701A28B00EE13D0DC20E92ADF9AF187EBDA85F2C0BB11264266D24AC10993C42D13177F0FFF02E9FF74A2711B8D7DBE93BE114EBD192111E8A334E40A415A6D8A4A1789A54C008F7C9F0869969BC5BE240C1583A312B3B2BF0865E0D12BD555CF4C4924859397AA9"
"36" "CD24ACB14333BE7826F84AC2BF27A6FC51C62266919FE2E4968E98982ECD72A01A49914E55F13F97282B2C75A21DFDE0D4226F540DB4EA3C99DB77CDBAF7297698A890DCA8A97669AAA4AC5BC28C539D14103BF4A2EB0635C85A0710967AE58CFA3B91B14425AC4B3A2B05FC88F4F2AD6D1253DF4BA311D6CA6C2A4273EF83D"
"37" "5133C7B3DB9AB68B5FB0529F923D851C37CF3BC856A310BE5046F17799028E31E125776BA76ECCD805C30F07385ED8214204F495615301AF1AED4DAF9D7AC469F00DEEB0C6EE354AE02E224DD9EA92EEB71911E92C790A14B26F30ABDBB06CD0DCAD52D463F60E695365FF4DCC1E340BB9FFEF789E8588A91CFBA43B45FF083"
"38" "076E7994D7B0C3AC00B6CC3A88AB0F8D814FFDA347527356619913BE04F1617479943471F455D4C4F1919612B80C71F475AFE2A9A81EDCF0B9AC20CE6A96E754C67DDB37135A8717C16EFA633CC37739EC367E3D746E7706AFDDB594B753C2E8EAA45C666A8164A6BD97006D16EC7EDF2906116EA58BCB633812027479C5D11"
"39" "DD443F5D7F9DF326738D892E3F33AFF9BDFF92A9C9C6AC3101C713789DCFBB28FE25D04A83965FAE85E66B158213CA8FA3B7A680B56C3A808211219CEE20122421AAF0C972C09E202A53FDA8521968E2CA651EE4938730A468FF905CE808A3CA577DD92FC98E5FE7919A9A187E39D8C0F87055C4C1ED1FC4F30F8D39A5B8FCC"
"40" "45A2F204C650442C7E45D340121F835EA04FC555281604B936E9AFF237282B30969761FBBA620245B491C5EF9C9DEA921BBB89A2E1FF7821B92057A7741FA7CACD14864174BE7F077730EFD83104120F6BFAEC3F8A86BEBABEFDA1548D0096C2F549E459BE2EDCC845FD6A9F3DDE0C053D7C8B9CEBA43287B2BC3323B22B565"
"41" "923B29EBFA9A25C6A14014126528ACA0169807C841A00B671A8AB6CA851743F24438508953AF25997CCC2804314DC0F717C247986394AA7BF41E964D2E7C328CFFFD05F72686657C18CAB7DDD6B1C841969747897AF575AE3CCBCA0D8476CD2A3FD482839F98F6FA6C17E77565CE3329AF7B855FD8DA3BC150CBB3A5BD75326"
"42" "123110AA051915B4886CD254AC9F7D2318EABA91E381F66B182019BF02AFA8BE0BC1B56A358E7854195B2B2794253D8E8EBE01504EF0809740D0B324192EEE8A71D4A5B3210E7B9ED9EEBEC3021F688A9E5C193E5815D12ADC6F970278C04675E51502B09F03B5326A709E838D2E53AEA272F67478BCFAFB62BA6C78E3AB28D"
"43" "1D1AC4ABABCA0D9572CA8F5D24011983A045EF17C45DDA826E493DAB2212DCA805F39E2A0B79A3A52BEE54B6D158188B0699610C5391E92AE1EFB8FE93F6ED4A707317F26B24B42427680DE2C9D5E1F33671C41C1863687CD5A3DF0E2F12CEA7B74E9D4B70251927F9D3B76F6719D86DA7DFA47E620C4E0320E6B567B62C143"
"44" "4725777FEEC8CCD81ECC366CEEFDA2ED44F9A29AF373CCFA83DBC9B4A44543F7B52B976F48472A42FC0B5B46973260BA84B693E649D16987BF273AC70B3B4C61742F434FC336D7274BCF2875F9455E9F9F939016400B48024F93FBBA30060CA50E0015C8AB92B6CB2FCE7629B836EE1071EA3EB69DCF7D8610EAB6FBE1E3061"
"45" "BD47EC9FC13240745861CB525B4F920DA3A96405C200CC8F243A300A3409F8EBE66A442B4FCA8F6A0F8257649DDB5E1D6B8A11934E723135FF0DEB2C50C701A78AB7BF5C8B4830CBA531641F042A951B23ABAB41086142D40ECD3E1B27562234F6110205C26A2E70EFF9359303EA80710B84E2EB1EAFA6A8C5F98691A2B26B9"
"46" "F6E46885D6A4E98F19C3EC8F0ACBD8061950B007827FC56DF45BDA940A6C21BC94EBE700FB9B03E7424192DF2B6E1AECC138FD4508902DF38534842897F72277B3964CF40D86150AF0F9CC73E7D9F19347F48513C74A33442BE137A719EDBE590794A8A2FD0280150D3B005BB8FD3F74356D1B7582BD150A30D562053B26927"
"47" "E5ED429FFBADDD0809738F3BE922CB1AFCB7FFB2B9E6E8762FE56BBFEE6B6BE9D4FFDF46CE7FE4C8E58B9736EE2E367BCE513C94B5B1748E6A4CB7C66233DDE5C8A0697CB87C84A1EA092D51637424F342DAA7ADF558CB1903D6A3776387ECF6AEB20A102FF30A112AAF3AD5B22725E0C7989937CDE0CBFDE48A1973B250DDA"
"48" "9D9AB9F7E02CB79A8A9C7C1D920587BE4FF9759BB22902FBC2122609116AEAF131835460A886C163983649311018791C8F9D22CFDD333E000A19BABC6677E4A3F1FC6C699419D59423475AE114B556DE5D961D77DD26236856946154876064B6D1D61285CD94AA02A918B8D688B1DEA7C97696B72F40AF4DBB77477D1785602"
"49" "7E24EA6128DD8DAF12EE21BFAF707FA904C333763D99205C6A713507A9E902BEA80C5C3AC6AE71F1B63CF5491D02B66217996852D1A1F5D7491128CE9EB9E4E5AC4B06C36E4F15D61C956CE76EF17DFE042924CA3B15EC01E018291029A189795478E4631F00225C017E78FB9E4E412B211A35AC8A372E403A920D8DE75DB4D"
"50" "B1FA2504A92D50E62D41D93138968F8A791A8792EC4C139CF8C439C2C0FC023FC547936A8F30AAFB9FDB1344F1AD26359F30615007D54460182E8BBCC23999A87C3826515F3F8F6548CFC8A0B745D532DE4007B2F85E8EC2CB9FBE7B677608E9F57E10ED47BB1E7C58E27F1D7E454E91DC6D454D56A10D51DDEDCA5E1F15926"
"51" "CEB13C7100A2DDBC2A5AF306C8DFDE7837D1764C8C1236176BF690D870C1F24A45CA89EFE608CBC3F7D471B59363AA7C9A9C5E2A3D051F424496BD26507D086D182E29067EE9F97BBA9E5C479E99D71EBFD6260370267973DE539FBC34FA1710F470821A5118FB2E7E50708D89BCED56FDCACC15A284A6DD9853FCEBBFB6524"
"52" "86A05E890946AD4493A17D4AF7B18B8A402F4D6D4891B17374FC87F6BFDDB639B53C3C627CDF324265917F2BAA403B50CFC604F293E0A269919380EF13F87074FB81BCC82D30276E0387E767959DBF83F060B6C6129166980120AF362058E5A2A2B204C4E268B8BDFB02AA93CA338457A58DF0813BD76312C0DF22BFBA9F95A"
"53" "E980CF55B2BA7ACABFAB952BA0F5B199D016B2FF77A2109238E4059B779FA474F4185D26702E25EB9699BAACEF3648F3FAAAE0AE2FC5275E63007EE7B22AB797B865CEE02565D42AB49AB39B345CCA0799B313A33AD1DB24A2CA1A81609815B764142B92DDC40A648D29B1AB79152005F5BEA76537452508509D61FD02AFC19"
"54" "531A9CB146BB8B490AF0734998886F66E1E42BB55A165F0FE5602C23D0282D44B041B098798CF4264D750D28C721AE3459BFE00D2EAC34DDA6D7A556DE6F1A9B0F74D1D082B6481647E68FF90AF91510EE9AF36D8968AAE5ADE52B44015AB42290893A986313B89FBE01905FAB7F795F4896BC289CD7D1F5DF036EC71935E90"
"55" "7541F95187B0D713552BC76A9F15B5E3F5188403CFE1DB2C439AFDC53CAEDE2530C751053F04C6FE48FCBAB29E51F70ECED910EBAF2CD7C5A57D663B054CE087C831CB70AF7C53D8EB09BB2A1B50CF888000E9D6D369A768D086F8427E5CDE05A940101AB80920E03E47B9465A0572550560D79E98F92D4956CE48A0E35593E"
"56" "D44E582AEA7A307DD8463EB3BDD9EA598031CD3050405C9785863F91FED9054E5B687249F9FD1D867645ACC870313761C7A701569F77EE28B7E763AC848964DA0CD7714DBC275A6D9AE89299A471EDF2AEFF5D80B30BEBD6258CE8BACE5DF2507903EB9862C1DE08ECC7DDFCDEB55BDDEE252A963A4D2629ADAA3F478BD3EC4"
"57" "53C43F09E180BB26FA48F689EE6CC2A97E5506118F4C9CED35BB4A4307F3894EACEFA561A503B9F6D56C82EB44BB91138901DBEEF9AEE303F4B8FBB0A306E956219502A6BF8E3976F039072530378FCC20A74B1195EF261D33A4951D0109975B29F83FE392878C2DF6FA5569032E31C972DF01C4ACF5AFF478019FDB03F169B"
"58" "B657E296656575FB48A0859F9396B1BB23FE6E8A26A940CEE48612578D71516D7B9586B3714A80896FBD90FA589C6F58E48C3579AD2CF009E45FBA46030A1CCB8FB1293DE81AE66943B4C89048EE7848AAF2A32FEE1FA55D2736D417852DFCD81EA2D2EC0790E92E13F279B42CA2B36EE8734CC31A681FF1CF112B583ED01DA"
"59" "DCA7F95F0DBC01AD331AACF385AF49C532CBCDF28D6FCCB8A53A26EE549F2545C8A1EA8AA5E7A685168A5A9DE202D970E3DCB052308EADD4E023ED2BFDFA569A3EE3F76D0928E8E010A28FFF5B560E6C2864B7AC6DF750892564C43448D8C47036C8744FAD57BD16A8BEDA84DEE30BC2F7B4E2C2D0C1693859BBD088DCC7E66"
"60" "826B513B28665E2EB39094D5ED47DA8C4447E2E013A3764D838E9A8BCFC799137F3000A3B0C124360D4016BE0147A8EDBE0E58E1041CF43305C320FA78F8904D0632A20E0BAAED7189E5CCEF2F00C93A5E94FBABEF3E14B2AE62E906E537EC6AB725E34EEBD6BABCE36ECA2FC0FF8BB210CD3C5DB5ED7E9CA7BB9776C726D2B"
"61" "0B2BD996DAA6438C2D34246EECFCAE9006E9CB777629596BF8374E765230FC0EE128CE7596CB6BFD73A0A5F2F037B9B81F3C3E8305A9EA7CB662339BB8A6E86344D5747DF42CBD0353E5B7B117402E9F143F5F173D294640A7A58666F1C129B84BD16749E07AE4B3E6413025967D7A0199A3DDA62A777035C5DE0897798B930"
"62" "6E870471BC3E085F1BBF85C607C9B5E44486B88B0D0D9462E3C53B578FBB51A0FA02A3AE66D51AFC8849BF1DBF89152B947DCBA0C3FDA2503783DF65A33859123E7BF5C2209CA172397A10C8BF9E023515B9E95825FDF4DE330D21B82421E6D9EE56C13CFA9573B44E412B2FEB8193884F2B7BD9A40EE542F2C1727E50CB218"
"63" "D296A826F36F1CFE55C7C10605C93DD12ABB08E34E8D566BB4CFE2B19B31FEBB93D09AC9CD70A2B630F933F4345CBB6681AC81DDCBE4D4FDE825B57E44D4F393FE92C8B7D7315521E924FE9920BC5EB4FBEA9F650F99D500890187A1BE306CF67A608402C9069414082FB1D807955AF12E4B40658D53DE3635E01C8C0731D1E"
"64" "16C87A2267A2F49945B09F9E20A6DA41B2B678068562848EF5BB7A83B8E61E93459A8C2174633451DADF409FF8A0F4BF61E2ED32FD6AB721407DAE20313C71A1751517B04EC52040C48A750AF0F98208824BC2AFF09F6BE8640610316148AEE32FBCE43DB7E94105E92C7CDC4FCC5BE43EA7AC46D14AFDC7AB2742D90F54A64"
"65" "123BF541A5A94194D12DDAD2DB79EC9FE71BB574C37B53E2E595D1264C952B67BB7D45A0B9B081924E80E19725EA7A6F697DDA743794533188BEA54131D32083AB7D77CA72EEDA88893E1F542105550EF1B02033B61608E0057A95A30D7FE565D253D763452C66B205DF3AFE5ABBE41B32FABE11956BAEBC50D6C976228D087"
"66" "29C4E89EC4EC99CDE5D229FDFF68DC20E7862A907521690F4FC71F041B935A1DE3AF1496457DEB15C480F257D52FB3D71D699278096FCCEF71C0E86889A8B17505AC9586BD0E0D16107D7B6CE9FC3D152871421BD6861F26C85D154BB85E6888D857CAB65577AF8D2D496D4AC905B949E3A721E64E1F14A70986A953B09E7AB"
"67" "21047ECC66DAAAFF1F123BD5219EFC1C89A19D899AE422CBDD933F9B9970C7B07B098CFD08B38D563BF67E385B854E0500173118B9C371657C7209268151E1751C4E4C80F40D6142FA3C5852797E3BDEAC18E02E716AFF3D8518F8D4AC31AB5E92B5C8F2AFD5300BB74119F8ED5486F0C12CF98A1DD039E87387053E906D54F"
"68" "E7A3888BF9479F4EB09337D1558F8E42C9A28142C055AB739F9B91C214DA7FF4CA9757C8440230D3FFB15436D617F0938BBD7F06426618C1F0E93F903C5558AC9A88D2D4DA29D20B3807C26A1948EB46CB5BEF10E9DF89474C7F65F1D26838DE860054947B22020694C7E9DBF4AF83EB003EB7D03306D4ACC6A108B6250B044"
"69" "8A7FBC7726939ACC5AB3EF500B4CE370C23D44F9861E394EF64E4746F6CA825C34350023026EED7CC2A83F8E2CDDF0F1ED3DC11067EFF7759E72D15174360E9C9E405EB73E01EE3D8E786B16AEC40BE3E420595688076411AFCB65EDBD6BCC3374921C89A6D737C9AF4C024B4E8DEC46007E7F303B2659CB907D64FC8F2B87B"
"70" "CE2FE8ECE3A190D5788EC774AA96891DC4C200AC4ECEEF26147D0EF106F0CB4A9FB57D52F4EB35518232F24E0B150FDDD0D52EE58252C2B2F2B6294C28D71F7FBFE2F485915C06265EF9B38D3DDF0E815A829F0F138829167804DDA42B7E5EC4DC721A4B7B0BA7FAF4CFA081F5355B1D85100031479F06E77453C213D6B318E"
"71" "A7B6871C557F4AA424CDB8F6A49632EA5B85231D7886C5D614E57AE2079394F642603A6674BD486AAE537D9FAFEFC1F1FDB7A22832D16DF164319CDD6949DF7F0B9DE71EA640C2735613110DF08E0DE5D1A1083985F733DF899273EDCE3018AA6C1859C415E7ACE7FC6741CE6C76A0EEF5A68B30E7E316CF18A7E752D84C3C0"
"72" "966E644CF594BBBA4B8F6C1DB5A79EF776AB4F47CD939D4D0BBAAA3D389A39100D26481CF000845016E2656FFF7CF80AD37284197078F94C9A7B15BE9E0E8DAE6F7531F038F33BCDFFD4D6C3619C666F9FBB0E5F3D5811CFB045351DC3A578C448DBDC15B64796DDA22FA72A6E0D0884B7E92E6C64B50E6E85388E348CCA1A5"
"73" "0156E429AE7D4886D87DBDE1450B52E32E0596D0513514FF269A59C5DB7C17808F51FE4E0ABE83A76A81DFDFA3410FBFF4E0F2510198476785EFEF3A9A61482765999CC796BBD16287138ED0C7564A9CB94456D384D49439ED8DE68FA66240677184ABD85F382BB9E753EF70A476058A05AD61CEE56AE34D2807423FD25D856"
"74" "32F96C98258D1D5D4FA0CE9DDFE412891140DAE625BCB2611ECAB8FFDB7DE0455325B11C1671F488F27EA0D51552B7002E632A02E5809CBD7252B603C082D60CB4DCB96C4F040E635C7B1FA2B42C532E418E30AAE77475119CB32FABC51D88A036D7DBF32BE5749E8D838B3492FDA3A3CB1FFDF5517F2890E12F396E8E5487C"
"75" "C6ECDF93B38E5C0F08405937671292D7AB9084F2B061180363061951CF10A535639CFCE97C2A54E5809B2F637F046004819579FF3CE6CEF42CD03CBADE2FBEFC99C92E24F72C9ECB3AF89857D5F5B16AA9B4F823BA1F2DDC459A83543355EC538F9C3DC76E1DD41214AD2C41B331F77E18DB90B8B61DE32CCB7E546BD158C8F"
"76" "7C656D354A61E9336BF6F0BB6F1BFB1B2F551EA710D17D58556F530DF14A2D38AD9C19E68"
}

5886
scripts/npc/units/creeps.kv Executable file

File diff suppressed because it is too large Load Diff

5433
scripts/npc/units/tower.kv Executable file

File diff suppressed because it is too large Load Diff

64
scripts/shops.txt Executable file
View File

@@ -0,0 +1,64 @@
"dota_shops"
{
"consumables"
{
}
"attributes"
{
}
"weapons_armor"
{
}
"misc"
{
}
// Level 1 - Green Recipes
"basics"
{
}
// Level 2 - Blue Recipes
"support"
{
}
"magics"
{
}
// Level 3 - Purple Recipes
"defense"
{
}
"weapons"
{
}
// Level 4 - Orange / Orb / Artifacts
"artifacts"
{
}
"sideshop1"
{
}
"sideshop2"
{
}
"secretshop"
{
"item" "item_1001"
"item" "item_1002"
"item" "item_1003"
"item" "item_1004"
"item" "item_1005"
"item" "item_1006"
}
}

View File

@@ -0,0 +1,7 @@
thtd_hanadayousei_01 = class({})
LinkLuaModifier("modifier_hanadayousei_01", "abilities/ability_lua/modifier_hanadayousei_01", LUA_MODIFIER_MOTION_NONE)
function thtd_hanadayousei_01:GetIntrinsicModifierName()
return "modifier_hanadayousei_01"
end

View File

@@ -0,0 +1,8 @@
thtd_hourainingyou_01 = class({})
LinkLuaModifier("modifier_hourainingyou_01", "abilities/ability_lua/modifier_hourainingyou_01", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier("modifier_hourainingyou_01_stun_lock", "abilities/ability_lua/modifier_hourainingyou_01_stun_lock", LUA_MODIFIER_MOTION_NONE)
function thtd_hourainingyou_01:GetIntrinsicModifierName()
return "modifier_hourainingyou_01"
end

View File

@@ -0,0 +1,83 @@
thtd_lily_01 = class({})
LinkLuaModifier("modifier_lily_01_effect_think", "abilities/ability_lua/modifier_lily_01_effect_think", LUA_MODIFIER_MOTION_NONE)
function thtd_lily_01:GetIntrinsicModifierName()
return "modifier_lily_01_effect_think"
end
function thtd_lily_01:GetAOERadius()
return self:GetSpecialValueFor("radius")
end
function thtd_lily_01:OnSpellStart()
if SpawnSystem.IsUnLimited then return end
if GameRules:GetCustomGameDifficulty() >= FUNNY_MODE then return end
local caster = self:GetCaster()
local ability = self
local targetPoint = self:GetCursorPosition()
local targets =
FindUnitsInRadius(
caster:GetTeamNumber(),
targetPoint,
nil,
ability:GetSpecialValueFor("radius"),
ability:GetAbilityTargetTeam(),
ability:GetAbilityTargetType(),
ability:GetAbilityTargetFlags(),
FIND_CLOSEST,
false
)
local exp = 1000 + caster:THTD_GetPower() * ability:GetSpecialValueFor("power_factor")
for k,v in pairs(targets) do
if v ~= nil and v:IsNull() == false and v:THTD_IsTower() and v ~= caster and v:GetOwner() == caster:GetOwner() and v:THTD_GetLevel() < THTD_MAX_LEVEL then
v:THTD_AddExp(exp)
end
end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/lily/ability_lily_01_a.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
thtd_lily_02 = class({})
LinkLuaModifier("modifier_lily_02_buff", "abilities/ability_lua/modifier_lily_02_buff", LUA_MODIFIER_MOTION_NONE)
function thtd_lily_02:OnSpellStart()
local caster = self:GetCaster()
caster:EmitSound("Sound_THTD.thtd_lily_02")
self.radius = self:GetSpecialValueFor("radius")
self.duration = self:GetSpecialValueFor("duration")
self.damage_up = self:GetSpecialValueFor("damage_up")
local targets =
FindUnitsInRadius(
caster:GetTeamNumber(),
caster:GetOrigin(),
nil,
self.radius,
self:GetAbilityTargetTeam(),
self:GetAbilityTargetType(),
self:GetAbilityTargetFlags(),
FIND_CLOSEST,
false
)
for k,v in pairs(targets) do
if not v:HasModifier("modifier_lily_02_buff") then
v:AddNewModifier(caster, self, "modifier_lily_02_buff", {Duration = self.duration})
end
end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/lily/ability_lily_02.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetOrigin())
ParticleManager:SetParticleControl(effectIndex, 1, Vector(self.radius,self.radius,self.radius))
ParticleManager:DestroyParticleSystemTime(effectIndex,self.duration)
end

View File

@@ -0,0 +1,61 @@
modifier_hanadayousei_01 = class({})
local public = modifier_hanadayousei_01
--------------------------------------------------------------------------------
function public:IsDebuff()
return false
end
--------------------------------------------------------------------------------
function public:IsHidden()
return true
end
--------------------------------------------------------------------------------
function public:IsPurgable()
return false
end
function public:GetTexture()
return "touhoutd/thtd_hanadayousei_01"
end
--------------------------------------------------------------------------------
function public:DeclareFunctions()
local funcs = {
MODIFIER_EVENT_ON_ATTACK,
}
return funcs
end
function public:OnAttack( params )
if IsServer() then
if params.attacker ~= self:GetParent() or self:GetParent():IsIllusion() then return end
if self:GetParent():PassivesDisabled() then return end
local caster = params.attacker
local target = params.target
if caster.__hanadayousei_lock ~= true then
caster.__hanadayousei_lock = true
local targets = THTD_FindUnitsInRadius(caster,caster:GetOrigin(),800)
local count = 1
for i=1,#targets do
local unit = targets[i]
if unit~=nil and unit:IsNull()==false and unit~=target and unit:IsAlive() then
caster:PerformAttack(unit,true,false,true,false,true,false,true)
count = count + 1
end
if count > 3 then
break
end
end
caster.__hanadayousei_lock = false
end
end
end

View File

@@ -0,0 +1,61 @@
modifier_hourainingyou_01 = class({})
local public = modifier_hourainingyou_01
--------------------------------------------------------------------------------
function public:IsDebuff()
return false
end
--------------------------------------------------------------------------------
function public:IsHidden()
return true
end
--------------------------------------------------------------------------------
function public:IsPurgable()
return false
end
function public:GetTexture()
return "touhoutd/thtd_hourainingyou_01"
end
--------------------------------------------------------------------------------
function public:DeclareFunctions()
local funcs = {
MODIFIER_EVENT_ON_ATTACK_LANDED,
}
return funcs
end
function public:OnAttackLanded( params )
if IsServer() then
if params.attacker ~= self:GetParent() or self:GetParent():IsIllusion() then return end
if self:GetParent():PassivesDisabled() then return end
local caster = params.attacker
local target = params.target
local ability = self:GetAbility()
if RollPercentage(ability:GetSpecialValueFor("chance")) then
if not target:HasModifier("modifier_hourainingyou_01_stun_lock") then
target:AddNewModifier(caster, ability, "modifier_hourainingyou_01_stun_lock", {Duration = ability:GetSpecialValueFor("lock_time")})
UnitStunTarget(caster,target,ability:GetSpecialValueFor("stun_time"))
end
local DamageTable = {
ability = ability,
victim = target,
attacker = caster,
damage = caster:THTD_GetAbilityPowerDamage(ability),
damage_type = ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
end
end

View File

@@ -0,0 +1,27 @@
modifier_hourainingyou_01_stun_lock = class({})
local public = modifier_hourainingyou_01_stun_lock
--------------------------------------------------------------------------------
function public:IsDebuff()
return false
end
--------------------------------------------------------------------------------
function public:IsHidden()
return false
end
--------------------------------------------------------------------------------
function public:IsPurgable()
return false
end
function public:GetTexture()
return "touhoutd/thtd_hourainingyou_01"
end
--------------------------------------------------------------------------------

View File

@@ -0,0 +1,50 @@
modifier_lily_01_effect_think = class({})
local public = modifier_lily_01_effect_think
function public:IsHidden()
return true
end
function public:IsDebuff()
return false
end
function public:IsPurgable()
return false
end
function public:GetAttributes()
return MODIFIER_ATTRIBUTE_IGNORE_INVULNERABLE
end
function public:OnIntervalThink()
if IsServer() then
local caster = self:GetParent()
local ability = self:GetAbility()
if ability:IsCooldownReady() and ability:IsFullyCastable() and SpawnSystem.IsUnLimited == false then
if caster.thtd_lily_01_effectIndex == nil then
caster.thtd_lily_01_effectIndex = ParticleManager:CreateParticle("particles/heroes/lily/ability_lily_01_ready.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControlEnt(caster.thtd_lily_01_effectIndex , 0, caster, 5, "follow_origin", Vector(0,0,0), true)
end
elseif caster.thtd_lily_01_effectIndex ~= nil then
ParticleManager:DestroyParticleSystem(caster.thtd_lily_01_effectIndex,true)
caster.thtd_lily_01_effectIndex = nil
end
end
end
function public:OnCreated(kv)
if IsServer() then
self:StartIntervalThink(self:GetAbility():GetSpecialValueFor("effect_tick"))
end
end
function public:OnDestroy(kv)
if IsServer() then
self:StartIntervalThink(-1)
end
end

View File

@@ -0,0 +1,51 @@
modifier_lily_02_buff = class({})
local public = modifier_lily_02_buff
--------------------------------------------------------------------------------
function public:IsDebuff()
return false
end
--------------------------------------------------------------------------------
function public:IsHidden()
return false
end
--------------------------------------------------------------------------------
function public:IsPurgable()
return false
end
function public:GetTexture()
return "touhoutd/thtd_lily_02"
end
--------------------------------------------------------------------------------
function public:OnCreated(kv)
if IsServer() then
local target = self:GetParent()
local ability_damage_up = self:GetAbility():GetSpecialValueFor("damage_up")
local playerid = self:GetCaster():GetPlayerOwnerID()
local crit = 1.0
if GameRules.player_bb_buff[playerid]["item_3029"] > 0 then
crit = 1 + GameRules.player_bb_buff[playerid]["item_3029"]/100
end
local bonus = math.floor(ability_damage_up * crit)
target:AddDamageOutgoingAll(bonus, "thtd_lily_02_damage_up")
end
end
--------------------------------------------------------------------------------
function public:OnDestroy(kv)
if IsServer() then
self:GetParent():AddDamageOutgoingAll("thtd_lily_02_damage_up")
end
end

View File

@@ -0,0 +1,74 @@
modifier_mugiyousei_01 = class({})
local public = modifier_mugiyousei_01
--------------------------------------------------------------------------------
function public:IsDebuff()
return false
end
--------------------------------------------------------------------------------
function public:IsHidden()
return true
end
--------------------------------------------------------------------------------
function public:IsPurgable()
return false
end
function public:GetTexture()
return "touhoutd/thtd_mugiyousei_01"
end
--------------------------------------------------------------------------------
function public:DeclareFunctions()
local funcs = {
MODIFIER_EVENT_ON_ATTACK_LANDED,
}
return funcs
end
function public:OnAttackLanded( params )
if IsServer() then
if params.attacker ~= self:GetParent() or self:GetParent():IsIllusion() then return end
if self:GetParent():PassivesDisabled() then return end
local caster = params.attacker
local target = params.target
local ability = self:GetAbility()
local damage = caster:THTD_GetAbilityPowerDamage(ability)
local time = ability:GetSpecialValueFor("damage_duration")
target:AddPoison(1, caster)
target:SetContextThink(DoUniqueString("thtd_mugiyousei01_attack"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if time <= 0 or THTD_IsValid(target) == false then
if target ~= nil and target:IsNull() == false then
target:AddPoison(-1)
end
return nil
end
local DamageTable = {
ability = ability,
victim = target,
attacker = caster,
damage = damage,
damage_type = ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
time = time - 1.0
return 1.0
end,
0)
end
end

View File

@@ -0,0 +1,102 @@
modifier_nazrin_01 = class({})
local public = modifier_nazrin_01
--------------------------------------------------------------------------------
function public:IsDebuff()
return false
end
--------------------------------------------------------------------------------
function public:IsHidden()
return true
end
--------------------------------------------------------------------------------
function public:IsPurgable()
return false
end
function public:GetTexture()
return "touhoutd/thtd_nazrin_01"
end
--------------------------------------------------------------------------------
function public:DeclareFunctions()
local funcs = {
MODIFIER_EVENT_ON_ATTACK_LANDED,
}
return funcs
end
function public:OnAttackLanded( params )
if IsServer() then
-- 必须加下下面判断否则会对所有单位攻击都有效因lua这个是按事件处理和KV的不同只要是攻击这个行为就会触发事件所以尽量不要使用lua的OnXXX事件方式
if params.attacker ~= self:GetParent() or self:GetParent():IsIllusion() then return end
if self:GetParent():PassivesDisabled() then return end
-- PrintTable(params)
-- [VScript] attacker:
-- [VScript] basher_tested: false
-- [VScript] cost: 0
-- [VScript] damage: 4
-- [VScript] damage_category: 1
-- [VScript] damage_flags: 0
-- [VScript] damage_type: 1
-- [VScript] diffusal_applied: false
-- [VScript] distance: 0
-- [VScript] do_not_consume: false
-- [VScript] fail_type: 0
-- [VScript] gain: 0
-- [VScript] heart_regen_applied: false
-- [VScript] ignore_invis: false
-- [VScript] issuer_player_index: 0
-- [VScript] mkb_tested: false
-- [VScript] new_pos: Vector 0000000003530FA8 [0.000000 0.000000 0.000000]
-- [VScript] no_attack_cooldown: false
-- [VScript] order_type: 0
-- [VScript] original_damage: 4
-- [VScript] process_procs: true
-- [VScript] ranged_attack: true
-- [VScript] record: 1
-- [VScript] reincarnate: false
-- [VScript] stout_tested: false
-- [VScript] target:
local caster = params.attacker
local target = params.target
local ability = self:GetAbility()
if SpawnSystem.IsUnLimited then
if caster:HasModifier("modifier_byakuren_03_buff") then
local targets = THTD_FindUnitsInRadius(caster,target:GetOrigin(),400)
local damage = caster:GetGold()*caster:THTD_GetStar()*caster.thtd_byakuren_buff_nazrin
for k,v in pairs(targets) do
local DamageTable = {
ability = ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = DAMAGE_TYPE_PHYSICAL,
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
end
return
end
if GameRules:GetCustomGameDifficulty() >= FUNNY_MODE then return end
if RollPercentage(ability:GetSpecialValueFor("bonus_chance")) then
local gold = math.floor(caster:THTD_GetPower() * ability:GetSpecialValueFor("power_percent")/100 + ability:GetSpecialValueFor("bonus_gold"))
THTD_ModifyGoldEx(caster:GetPlayerOwnerID(), gold , true, DOTA_ModifyGold_CreepKill)
SendOverheadEventMessage(caster:GetPlayerOwner(), OVERHEAD_ALERT_GOLD, target, gold, caster:GetPlayerOwner() )
caster:EmitSound("Sound_THTD.thtd_nazrin_01")
end
end
end

View File

@@ -0,0 +1,7 @@
thtd_mugiyousei_01 = class({})
LinkLuaModifier("modifier_mugiyousei_01", "abilities/ability_lua/modifier_mugiyousei_01", LUA_MODIFIER_MOTION_NONE)
function thtd_mugiyousei_01:GetIntrinsicModifierName()
return "modifier_mugiyousei_01"
end

View File

@@ -0,0 +1,7 @@
thtd_nazrin_01 = class({})
LinkLuaModifier("modifier_nazrin_01", "abilities/ability_lua/modifier_nazrin_01", LUA_MODIFIER_MOTION_NONE)
function thtd_nazrin_01:GetIntrinsicModifierName()
return "modifier_nazrin_01"
end

View File

@@ -0,0 +1,395 @@
function OnAlice01SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
local unit = CreateUnitByName(
"alice_boom",
targetPoint,
false,
caster:GetOwner(),
caster:GetOwner(),
caster:GetTeam()
)
if (unit == nil) then return end
unit.thtd_spawn_unit_owner = caster
unit:SetControllableByPlayer(caster:GetPlayerOwnerID(), true)
FindClearSpaceForUnit(unit, targetPoint, false)
keys.ability:ApplyDataDrivenModifier(caster, unit, "modifier_alice_01_rooted", {})
keys.ability:ApplyDataDrivenModifier(caster, unit, "modifier_alice_boom_tracker", {})
unit:AddNewModifier(unit, nil, "modifier_invisible", nil)
local ability = unit:FindAbilityByName("thtd_alice_unit_kill")
if ability then
ability:SetLevel(1)
end
local time = keys.duration_time
caster:SetContextThink(DoUniqueString("thtd_alice_01"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if unit==nil or unit:IsNull() or unit:IsAlive()==false then
return nil
end
if caster==nil or caster:IsNull() or caster:IsAlive()==false or caster:THTD_IsHidden() or time <= 0 then
unit:AddNoDraw()
unit:ForceKill(false)
return nil
end
local enemies = THTD_FindUnitsInRadius(caster, targetPoint, keys.range1)
if #enemies > 0 then
enemies = THTD_FindUnitsInRadius(caster, targetPoint, keys.range2)
if ability then
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * (caster.thtd_alice03_damage_up or 1)
if caster:HasModifier("modifier_alice_power666") then
damage = damage * 3
end
for k,v in pairs(enemies) do
local d = GetDistanceBetweenTwoVec2D(targetPoint, v:GetAbsOrigin())
local factor = 1.0
if d <= keys.range1 then
factor = 5
else
factor = keys.range2 / d
end
if v~=nil and v:IsNull()==false and v:IsAlive() then
UnitStunTarget(caster,v,keys.stun_time * math.min(2.0, factor))
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage * factor,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
end
unit:CastAbilityNoTarget(ability, caster:GetPlayerOwnerID())
unit:EmitSound("Hero_Techies.LandMine.Detonate")
return nil
end
end
time = time - 0.2
return 0.2
end,
0)
end
function OnAliceUnitKillSpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
caster:SetContextThink(DoUniqueString("thtd_alice_unit"),
function()
local owner = caster.thtd_spawn_unit_owner
if owner:IsPower666() then
local modifier = owner:FindModifierByName("modifier_alice_power666")
if modifier == nil then
owner:FindAbilityByName("thtd_alice_01"):ApplyDataDrivenModifier(owner, owner, "modifier_alice_power666", {Duration=10.0})
else
modifier:SetDuration(10.0, false)
end
end
caster:AddNoDraw()
caster:ForceKill(false)
return nil
end,
0.5)
end
function OnAlice02SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local unit = CreateUnitByName(
"alice_falanxi_ningyou"
,caster:GetOrigin() + caster:GetForwardVector() * 500
,false
,caster:GetOwner()
,caster:GetOwner()
,caster:GetTeam()
)
if unit == nil then
keys.ability:EndCooldown()
return
end
Margatroid_CreateLine(caster, unit)
FindClearSpaceForUnit(unit, unit:GetOrigin(), false)
unit:SetControllableByPlayer(caster:GetPlayerOwnerID(), false)
unit:SetHasInventory(false)
unit.thtd_spawn_unit_owner = caster
local oldSwpanUnit = caster.thtd_summon_unit
if oldSwpanUnit ~=nil and oldSwpanUnit:IsNull() == false then
oldSwpanUnit:AddNoDraw()
oldSwpanUnit:ForceKill(false)
end
caster.thtd_summon_unit = unit
keys.ability:ApplyDataDrivenModifier(caster, unit, "modifier_alice_02", nil)
local powerStack = 0
local pv = caster:GetAbilityPowerValue("thtd_alice_02")
if pv ~= nil then
powerStack = pv[1]
end
local hero = caster:GetOwner()
if GameRules.player_bb_buff[hero.thtd_player_id]["item_3016"] > 0 or powerStack > 0 then
unit:AddNewModifier(unit, nil, "modifier_bb_buff_3016_effect", nil):SetStackCount(GameRules.player_bb_buff[hero.thtd_player_id]["item_3016"] + powerStack)
end
-- local ability = unit:FindAbilityByName("doom_bringer_infernal_blade")
unit:SetContextThink(DoUniqueString("modifier_alice_02"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if caster==nil or caster:IsNull() or caster:IsAlive()==false or caster:THTD_IsHidden() then
ParticleManager:DestroyParticleSystem(unit.effect_line, true)
unit:AddNoDraw()
unit:ForceKill(false)
caster.thtd_summon_unit = nil
return nil
end
unit:SetBaseDamageMax(caster:THTD_GetAttack())
unit:SetBaseDamageMin(caster:THTD_GetAttack())
if GetDistanceBetweenTwoVec2D(caster:GetOrigin(), unit:GetOrigin()) > 1000 then
local forward = (unit:GetAbsOrigin() - caster:GetAbsOrigin()):Normalized()
unit:MoveToPosition(caster:GetOrigin() + forward*1000)
end
return 0.3
end,
0)
end
function OnAlice02Ningyou01AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local owner = caster.thtd_spawn_unit_owner
local particle = ParticleManager:CreateParticle("particles/units/heroes/hero_techies/techies_land_mine_explode.vpcf",PATTACH_CUSTOMORIGIN,caster)
ParticleManager:SetParticleControl(particle,0,target:GetOrigin()+Vector(0,0,64))
ParticleManager:DestroyParticleSystem(particle,false)
local targets = THTD_FindUnitsInRadius(owner, target:GetOrigin(), keys.range)
local damage = owner:THTD_GetStarDamage() * keys.power_damage * (owner.thtd_alice03_damage_up or 1)
if owner:HasModifier("modifier_alice_power666") then
damage = damage * 3
end
local DamageTable = {
ability = keys.ability,
victim = target,
attacker = owner,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE,
}
UnitDamageTarget(DamageTable)
end
function OnAlice02Ningyou02AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex) --buff提供者
local target = keys.target -- 被攻击目标
if RollPercentage(keys.CritChance) then
UnitDamageHpRemove(caster.thtd_spawn_unit_owner, target, keys.CritHealth)
end
end
function OnAlice04SpellStart(keys)
local caster=keys.caster
local caster_pos=caster:GetOrigin()
local direction=(keys.target:GetOrigin()-caster_pos):Normalized()
local base_pos=caster_pos-direction*keys.Radius
caster:MoveToTargetToAttack(keys.target)
caster.thtd_alice03_damage_up = keys.damage_up
local dolls_and_pos={} -- [doll,start_pos]
local start_pos=base_pos
local doll0=Margatroid_CreateDoll(caster,caster_pos+(start_pos-caster_pos):Normalized()*20,direction)
keys.ability:ApplyDataDrivenModifier(caster, doll0, "modifier_alice_04_rooted", {})
dolls_and_pos[1]={doll=doll0,start_pos=start_pos}
local rotate_angle=QAngle(0,35,0)
local start_pos=RotatePosition(caster_pos,rotate_angle,base_pos)
local doll=Margatroid_CreateDoll(caster,caster_pos+(start_pos-caster_pos):Normalized()*20,direction)
keys.ability:ApplyDataDrivenModifier(caster, doll, "modifier_alice_04_rooted", {})
dolls_and_pos[2]={doll=doll,start_pos=start_pos}
local rotate_angle=QAngle(0,-35,0)
local start_pos=RotatePosition(caster_pos,rotate_angle,base_pos)
local doll=Margatroid_CreateDoll(caster,caster_pos+(start_pos-caster_pos):Normalized()*20,direction)
keys.ability:ApplyDataDrivenModifier(caster, doll, "modifier_alice_04_rooted", {})
dolls_and_pos[3]={doll=doll,start_pos=start_pos}
local rotate_angle=QAngle(0,70,0)
local start_pos=RotatePosition(caster_pos,rotate_angle,base_pos)
local doll=Margatroid_CreateDoll(caster,caster_pos+(start_pos-caster_pos):Normalized()*20,direction)
keys.ability:ApplyDataDrivenModifier(caster, doll, "modifier_alice_04_rooted", {})
dolls_and_pos[4]={doll=doll,start_pos=start_pos}
local rotate_angle=QAngle(0,-70,0)
local start_pos=RotatePosition(caster_pos,rotate_angle,base_pos)
local doll=Margatroid_CreateDoll(caster,caster_pos+(start_pos-caster_pos):Normalized()*20,direction)
keys.ability:ApplyDataDrivenModifier(caster, doll, "modifier_alice_04_rooted", {})
dolls_and_pos[5]={doll=doll,start_pos=start_pos}
local powerDamage = 0
local pv = caster:GetAbilityPowerValue("thtd_alice_03")
if pv ~= nil then
powerDamage = pv[1]
end
for _,tab in pairs(dolls_and_pos) do
local OnDollFinshMove=
function (hDoll)
local doll_pos=hDoll:GetOrigin()
local target_dir=direction
hDoll:SetForwardVector(target_dir)
local time = (keys.max_count - 1) * 0.4
local caster = hDoll.thtd_spawn_unit_owner
hDoll:SetContextThink(
DoUniqueString("margatroid02_action_delay"),
function ()
if caster==nil or caster:IsNull() or caster:IsAlive()==false or caster:THTD_IsHidden() or time <= 0 then
ParticleManager:DestroyParticleSystem(hDoll.effect_line ,false)
hDoll:AddNoDraw()
hDoll:ForceKill(false)
if caster ~= nil then caster.thtd_alice03_damage_up = nil end
return nil
end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/alice/ability_alice_02.vpcf", PATTACH_CUSTOMORIGIN, hDoll)
ParticleManager:SetParticleControl(effectIndex, 0, hDoll:GetAttachmentOrigin(hDoll:ScriptLookupAttachment("attach_attack1"))+Vector(0,0,30))
ParticleManager:SetParticleControl(effectIndex, 1, hDoll:GetOrigin()+hDoll:GetForwardVector()*keys.Distance)
ParticleManager:SetParticleControl(effectIndex, 9, hDoll:GetAttachmentOrigin(hDoll:ScriptLookupAttachment("attach_attack1"))+Vector(0,0,30))
hDoll:EmitSound("Voice_Thdots_Alice.AbilityAlice011")
-- local angles=VectorToAngles(target_dir)
-- angles.y=-angles.y
-- --print("x0="..tostring(target_dir.x).." y0="..tostring(target_dir.y).." z0="..tostring(target_dir.z))
-- --print("x1="..tostring(angles.x).." y1="..tostring(angles.y).." z1="..tostring(angles.z))
-- local rotate_angle=angles
-- local enemies=FindUnitsInRadius(
-- caster:GetTeamNumber(),
-- doll_pos+target_dir*keys.Distance*0.5,
-- nil,
-- keys.Distance,
-- DOTA_UNIT_TARGET_TEAM_ENEMY,
-- DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC,
-- DOTA_UNIT_TARGET_FLAG_NONE,
-- FIND_ANY_ORDER,
-- false)
-- local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
-- for __,enemy in pairs(enemies) do
-- local after_rotate_pos=RotatePosition(doll_pos,rotate_angle,enemy:GetOrigin())
-- if math.abs(after_rotate_pos.y-doll_pos.y)<keys.LaserRadius then
-- local DamageTable = {
-- ability = keys.ability,
-- victim = enemy,
-- attacker = caster,
-- damage = damage,
-- damage_type = keys.ability:GetAbilityDamageType(),
-- damage_flags = DOTA_DAMAGE_FLAG_NONE
-- }
-- UnitDamageTarget(DamageTable)
-- end
-- end
if hDoll == doll0 then
-- print("-----------first")
local targets =
FindUnitsInLine(
caster:GetTeamNumber(),
hDoll:GetOrigin(),
hDoll:GetOrigin() + hDoll:GetForwardVector()*keys.Distance,
nil,
keys.Radius,
keys.ability:GetAbilityTargetTeam(),
keys.ability:GetAbilityTargetType(),
keys.ability:GetAbilityTargetFlags()
)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * (caster.thtd_alice03_damage_up or 1) * (1 + powerDamage/100)
if caster:HasModifier("modifier_alice_power666") then
damage = damage * 3
end
if caster:IsPower999() then
damage = damage * 5
end
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
end
time = time - 0.4
return 0.4
end,
0)
end
if tab.doll then
Margatroid_MoveDoll(
tab.doll,
tab.start_pos,
keys.Radius*2,
OnDollFinshMove,false)
end
end
end
function Margatroid_CreateDoll(hCaster, vecPos, vecForward)
local doll=CreateUnitByName(
"alice_boom",
vecPos,
false,
hCaster,
hCaster,
hCaster:GetTeam()
)
doll.thtd_spawn_unit_owner = hCaster
Margatroid_CreateLine(hCaster,doll)
if vecForward then
local angles = VectorToAngles(vecForward)
doll:SetAngles(angles.x,angles.y,angles.z)
end
return doll
end
function Margatroid_MoveDoll(hDoll, vecTarget, fMoveSpeed, fnOnFinshMove,isfly)
local tick_interval=0.03
local distance=(hDoll:GetOrigin()-vecTarget):Length()
local vecMove=(hDoll:GetOrigin()-vecTarget):Normalized()*fMoveSpeed*tick_interval
local tick=math.floor(distance/(fMoveSpeed*tick_interval))
local finish_move=false
hDoll:SetContextThink(
DoUniqueString("margatroid_move_doll"),
function ()
hDoll:SetAbsOrigin(GetGroundPosition(hDoll:GetOrigin()+vecMove,hDoll))
tick=tick-1
if tick<=0 then
if fnOnFinshMove then fnOnFinshMove(hDoll) end
return nil
end
return tick_interval
end,0)
end
function Margatroid_CreateLine(caster,doll)
local effectIndex = ParticleManager:CreateParticle("particles/heroes/alice/ability_alice_line.vpcf", PATTACH_CUSTOMORIGIN, doll)
ParticleManager:SetParticleControlEnt(effectIndex , 0, caster, 5, "attach_line", Vector(0,0,0), true)
ParticleManager:SetParticleControlEnt(effectIndex , 1, doll, 5, "attach_hitloc", Vector(0,0,0), true)
doll.effect_line = effectIndex
end

View File

@@ -0,0 +1,368 @@
function OnAya01RandomSuccess(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
OnAya01AttackEffectSuccess(keys,caster,target)
end
function OnAya01AttackEffectSuccess(keys,caster,target)
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_aya/ability_aya_01.vpcf",PATTACH_CUSTOMORIGIN,caster)
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetOrigin()+caster:GetForwardVector()*60)
ParticleManager:DestroyParticleSystem(effectIndex,false)
local ability = caster:FindAbilityByName("thtd_aya_01")
local range = ability:GetSpecialValueFor("range")
if target:HasModifier("modifier_aya01_news_buff") == false then
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_aya/ability_aya_01_news.vpcf",PATTACH_CUSTOMORIGIN,caster)
ParticleManager:SetParticleControl(effectIndex, 0, target:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
ability:ApplyDataDrivenModifier(caster,target,"modifier_aya01_news_buff", nil)
end
local powerDamage = 0
local pv = caster:GetAbilityPowerValue("thtd_aya_01")
if pv ~= nil then
powerDamage = pv[1]
end
local damage = caster:THTD_GetAbilityPowerDamage(ability) + powerDamage * caster:THTD_GetStarDamage()
local targets = THTD_FindUnitsInRadius(caster, target:GetOrigin(), range)
for _,v in pairs(targets) do
local damage_table = {
ability = ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(damage_table)
end
local effectIndex = ParticleManager:CreateParticle("particles/econ/items/windrunner/windrunner_cape_cascade/windrunner_windrun_cascade.vpcf",PATTACH_CUSTOMORIGIN,nil)
ParticleManager:SetParticleControl(effectIndex, 0, target:GetOrigin())
ParticleManager:SetParticleControl(effectIndex, 1, target:GetOrigin())
ParticleManager:SetParticleControl(effectIndex, 3, target:GetOrigin())
ParticleManager:DestroyParticleSystemTime(effectIndex,2)
if caster:FindAbilityByName("thtd_aya_03"):GetLevel() > 0 then
caster:FindAbilityByName("thtd_aya_02"):EndCooldown()
end
end
function OnAya01AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local entities = THTD_FindUnitsAll(caster)
for k,v in pairs(entities) do
local modifier = v:FindModifierByName("modifier_aya01_news_buff")
if modifier == nil then
modifier = v:FindModifierByName("modifier_hatate01_news_buff")
end
if modifier ~= nil then
local count = modifier:GetStackCount()
if count < 999 then
modifier:SetStackCount(count + 1)
end
end
end
local damage_table = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = caster:THTD_GetAttack() * GetAyaBuffCrit(caster, target),
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(damage_table)
end
function GetAyaBuffCrit(caster, target)
local powerDamage = 0
local pv = caster:GetAbilityPowerValue("thtd_aya_01")
if pv ~= nil then
powerDamage = pv[2]
end
local damage_up = caster:GetAbilityValue("thtd_aya_01", "damage_up") + powerDamage
if caster:IsPower999() then
damage_up = damage_up + 4
end
local crit = 1.0
local modifier = target:FindModifierByName("modifier_aya01_news_buff")
if modifier == nil then
modifier = target:FindModifierByName("modifier_hatate01_news_buff")
end
if modifier ~= nil then
crit = crit + modifier:GetStackCount() * damage_up / 100
end
if caster:IsPower666() then
crit = crit * 4
end
return crit
end
function OnAya02SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
local rad = GetRadBetweenTwoVec2D(caster:GetOrigin(),targetPoint)
caster:StartGesture(ACT_DOTA_CAST_ABILITY_2)
caster:SetForwardVector(Vector(math.cos(rad),math.sin(rad),0))
keys.ability:ApplyDataDrivenModifier(caster,caster,"modifier_aya_02_pause", nil)
local powerDamage = 0
local pv = caster:GetAbilityPowerValue("thtd_aya_02")
if pv ~= nil then
powerDamage = pv[1]
end
caster.last_start_point = caster:GetAbsOrigin()
local count = 0
caster:SetContextThink(DoUniqueString("ability_aya_02_move"),
function ()
if GameRules:IsGamePaused() then return 0.03 end
if GetDistanceBetweenTwoVec2D(caster:GetOrigin(), targetPoint) >= 90 and GetDistanceBetweenTwoVec2D(caster:GetOrigin(), targetPoint) < keys.ability:GetCastRange()
and caster:HasModifier("modifier_touhoutd_release_hidden") == false then
local vOrgin = caster:GetOrigin()
local vCurrent = vOrgin + Vector(math.cos(rad),math.sin(rad),0)*90
caster:SetAbsOrigin(vCurrent)
count = count + 1
if count >= 5 then
count = 0
local targets =
FindUnitsInLine(
caster:GetTeamNumber(),
caster.last_start_point,
vCurrent,
nil,
200,
keys.ability:GetAbilityTargetTeam(),
keys.ability:GetAbilityTargetType(),
keys.ability:GetAbilityTargetFlags()
)
caster.last_start_point = vCurrent
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) + powerDamage * caster:THTD_GetStarDamage()
for _,v in pairs(targets) do
local damage_table = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage * GetAyaBuffCrit(caster, v),
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(damage_table)
if caster:FindAbilityByName("thtd_aya_03"):GetLevel() > 0 then
OnAyaAttack(keys,v)
end
end
end
else
local vCurrent = caster:GetAbsOrigin()
FindClearSpaceForUnit(caster, vCurrent, false)
caster:THTD_DestroyLevelEffect()
caster:THTD_CreateLevelEffect()
caster:RemoveGesture(ACT_DOTA_CAST_ABILITY_2)
caster:RemoveModifierByName("modifier_aya_02_pause")
if count > 0 then
local targets =
FindUnitsInLine(
caster:GetTeamNumber(),
caster.last_start_point,
vCurrent,
nil,
200,
keys.ability:GetAbilityTargetTeam(),
keys.ability:GetAbilityTargetType(),
keys.ability:GetAbilityTargetFlags()
)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) + powerDamage * caster:THTD_GetStarDamage()
for _,v in pairs(targets) do
local damage_table = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage * GetAyaBuffCrit(caster, v),
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(damage_table)
if caster:FindAbilityByName("thtd_aya_03"):GetLevel() > 0 then
OnAyaAttack(keys,v)
end
end
end
return nil
end
return 0.03
end,
0.03)
end
function OnAyaAttack(keys,target)
local caster = EntIndexToHScript(keys.caster_entindex)
if caster:HasModifier("modifier_eirin_02_spell_buff") then
local eirin = caster:FindModifierByName("modifier_eirin_02_spell_buff"):GetCaster()
if eirin ~= nil then
OnAyaLinkToEirin01(eirin,target,caster)
end
end
if caster:HasModifier("modifier_item_2011_attack_stun") then
--todo
end
-- 基本上可叠 300 - 700 层
local entities = THTD_FindUnitsAll(caster)
for k,v in pairs(entities) do
local modifier = v:FindModifierByName("modifier_aya01_news_buff")
if modifier == nil then
modifier = v:FindModifierByName("modifier_hatate01_news_buff")
end
if modifier ~= nil then
local count = modifier:GetStackCount()
if count < 999 then
modifier:SetStackCount(count + 1)
end
end
end
local damage_table = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = caster:THTD_GetAttack() * GetAyaBuffCrit(caster, target),
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(damage_table)
if RollPercentage(caster:GetAbilityValue("thtd_aya_01", "chance")) then
OnAya01AttackEffectSuccess(keys,caster,target)
end
end
function OnAya03WingsSpellThink(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if keys.ability:GetLevel() < 1 then
if caster.thtd_aya_03_wings~=nil and caster.thtd_aya_03_wings:IsNull()==false then
caster.thtd_aya_03_wings:RemoveSelf()
caster.thtd_aya_03_wings = nil
end
return
end
if caster.thtd_aya_03_wings == nil then
caster.thtd_aya_03_wings = CreateUnitByName(
"npc_unit_aya_03_wings",
caster:GetOrigin(),
false,
caster,
caster,
caster:GetTeam()
)
caster.thtd_aya_03_wings:FollowEntity( caster, true )
end
end
function OnAyaLinkToEirin01(caster,target,attacker)
local ability = caster:FindAbilityByName("thtd_eirin_01")
local manaCost = ability:GetSpecialValueFor("mana_cost")
local manaBonus = ability:GetSpecialValueFor("mana_bonus")/100
local manaChance = ability:GetSpecialValueFor("mana_chance")
if caster:GetMana() >= manaCost then
if RollPercentage(caster:THTD_GetStar() * manaChance) then
caster:SetMana(math.min(caster:GetMaxMana(), caster:GetMana() - manaCost + caster:GetMaxMana() * manaBonus))
else
caster:SetMana(caster:GetMana() - manaCost)
end
local now = GameRules:GetGameTime()
if now - (target.thtd_eirin_01_project or 0) < 1 then
local delay = GetDistanceBetweenTwoVec2D(caster:GetAbsOrigin(), target:GetAbsOrigin()) / 1400
caster:SetContextThink(DoUniqueString("dota_timer"),
function()
if GameRules:IsGamePaused() then return 0.1 end
if IsValidAlive(target) then
local damage = caster:THTD_GetAbilityPowerDamage(ability)
local DamageTable = {
ability = ability,
victim = target,
attacker = caster,
damage = damage,
damage_type = ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
Eirin01HitCount(caster)
end
return nil
end,
delay)
return
end
target.thtd_eirin_01_project = now
caster:StartGesture(ACT_DOTA_CAST_ABILITY_1)
local info =
{
Target = target,
Source = caster,
Ability = ability,
EffectName = "particles/heroes/thtd_eirin/ability_eirin_01.vpcf",
iMoveSpeed = 1400,
vSourceLoc= caster:GetAbsOrigin(), -- Optional (HOW)
bDrawsOnMinimap = false, -- Optional
bDodgeable = true, -- Optional
bIsAttack = false, -- Optional
bVisibleToEnemies = true, -- Optional
bReplaceExisting = false, -- Optional
flExpireTime = GameRules:GetGameTime() + 10, -- Optional but recommended
bProvidesVision = true, -- Optional
iVisionRadius = 400, -- Optional
iVisionTeamNumber = caster:GetTeamNumber(), -- Optional
ExtraData = { -- 注意,只支持简单类型,不支持 table数据
attacker_entindex = attacker:GetEntityIndex()
}
}
local projectile = ProjectileManager:CreateTrackingProjectile(info)
ParticleManager:DestroyLinearProjectileSystem(projectile,false)
end
end
-- 同abilityeirin.lua
function Eirin01HitCount(caster)
if caster.thtd_eirin_01_count_lock == true then
return
end
if not caster:HasModifier("modifier_eirin_01_count") then
caster:FindAbilityByName("thtd_eirin_02"):ApplyDataDrivenModifier(caster, caster, "modifier_eirin_01_count", {duration = SpawnSystem.CurTime})
local effectName = "particles/addons_gameplay/morokai_orb_overhead_counter.vpcf"
local effectIndex = ParticleManager:CreateParticle(effectName, PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetAbsOrigin() + Vector(0, 0, 410))
ParticleManager:SetParticleControl(effectIndex, 2, Vector(1, 0, 0))
caster.thtd_eirin_01_count_effect = effectIndex
end
caster.thtd_eirin_01_count = (caster.thtd_eirin_01_count or 0) + 1
if caster.thtd_eirin_01_count > 500 then
caster.thtd_eirin_01_count = 500
return
end
local one = math.floor(caster.thtd_eirin_01_count/100)
local two = math.floor((caster.thtd_eirin_01_count - one * 100)/10)
local three = caster.thtd_eirin_01_count - one * 100 - two * 10
if three == 0 then three = 1 end
ParticleManager:SetParticleControl(caster.thtd_eirin_01_count_effect, 2, Vector(three, two, one))
end

View File

@@ -0,0 +1,371 @@
function OnByakuren01SpellStartUp(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
--解决浮点数精度问题
local tick_step = math.floor(keys.tick_step * 100 + 0.5) / 100
local min_tick = math.floor(keys.min_tick * 100 + 0.5) / 100
local max_tick = math.floor(keys.max_tick * 100 + 0.5) / 100
local base_tick = math.floor(keys.base_tick * 100 + 0.5) / 100
if caster.thtd_byakuren_01_attack_time == nil then
caster.thtd_byakuren_01_attack_time = base_tick
end
if caster.thtd_byakuren_01_extra_damage == nil then
caster.thtd_byakuren_01_extra_damage = 100
end
if caster.thtd_byakuren_01_attack_time > min_tick then
caster.thtd_byakuren_01_attack_time = caster.thtd_byakuren_01_attack_time - tick_step
caster.thtd_byakuren_01_extra_damage = caster.thtd_byakuren_01_extra_damage - keys.extra_damage
local modifier = caster:FindModifierByName("modifier_attack_time") or caster:AddNewModifier(caster, nil, "modifier_attack_time", {})
if modifier ~= nil then
if caster.thtd_byakuren_01_attack_time <= min_tick then
modifier:SetStackCount((caster.thtd_byakuren_01_attack_time+tick_step)*10)
else
modifier:SetStackCount(caster.thtd_byakuren_01_attack_time*10)
end
end
end
ByakurenUpdateBuff(caster)
end
function OnByakuren01SpellStartDown(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
--解决浮点数精度问题
local tick_step = math.floor(keys.tick_step * 100 + 0.5) / 100
local min_tick = math.floor(keys.min_tick * 100 + 0.5) / 100
local max_tick = math.floor(keys.max_tick * 100 + 0.5) / 100
if caster.thtd_byakuren_01_attack_time == nil then
caster.thtd_byakuren_01_attack_time = base_tick
end
if caster.thtd_byakuren_01_extra_damage == nil then
caster.thtd_byakuren_01_extra_damage = 100
end
if caster.thtd_byakuren_01_attack_time < max_tick then
caster.thtd_byakuren_01_attack_time = caster.thtd_byakuren_01_attack_time + tick_step
caster.thtd_byakuren_01_extra_damage = caster.thtd_byakuren_01_extra_damage + keys.extra_damage
local modifier = caster:FindModifierByName("modifier_attack_time") or caster:AddNewModifier(caster, nil, "modifier_attack_time", {})
if modifier ~= nil then
modifier:SetStackCount(caster.thtd_byakuren_01_attack_time*10)
end
end
ByakurenUpdateBuff(caster)
end
function ByakurenUpdateBuff(caster)
local ability = caster:FindAbilityByName("thtd_byakuren_01")
local base_tick = math.floor(ability:GetSpecialValueFor("base_tick") * 100 + 0.5) / 100
if caster.thtd_byakuren_01_attack_time == nil then
caster.thtd_byakuren_01_attack_time = base_tick
end
if caster.thtd_byakuren_01_extra_damage == nil then
caster.thtd_byakuren_01_extra_damage = 100
end
if caster.thtd_byakuren_01_attack_time > base_tick then
caster:RemoveModifierByName("modifier_byakuren_attack_down")
caster:RemoveModifierByName("modifier_byakuren_attack_equal")
ability:ApplyDataDrivenModifier(caster, caster, "modifier_byakuren_attack_up", {})
elseif caster.thtd_byakuren_01_attack_time == base_tick then
caster:RemoveModifierByName("modifier_byakuren_attack_down")
caster:RemoveModifierByName("modifier_byakuren_attack_up")
ability:ApplyDataDrivenModifier(caster, caster, "modifier_byakuren_attack_equal", {})
elseif caster.thtd_byakuren_01_attack_time < base_tick then
caster:RemoveModifierByName("modifier_byakuren_attack_up")
caster:RemoveModifierByName("modifier_byakuren_attack_equal")
ability:ApplyDataDrivenModifier(caster, caster, "modifier_byakuren_attack_down", {})
end
local modifier = caster:FindModifierByName("modifier_byakuren_damage_percent") or ability:ApplyDataDrivenModifier(caster, caster, "modifier_byakuren_damage_percent", {})
if modifier ~= nil then
modifier:SetStackCount(caster.thtd_byakuren_01_extra_damage)
end
local ability = caster:FindAbilityByName("thtd_byakuren_04")
if ability:GetLevel() > 0 then
if caster.thtd_byakuren_01_attack_time > base_tick then
if caster:HasModifier("modifier_byakuren_04_magic_buff") == false then
ability:ApplyDataDrivenModifier(caster,caster,"modifier_byakuren_04_magic_buff", nil)
end
if caster:HasModifier("modifier_byakuren_04_physical_buff") then
caster:RemoveModifierByName("modifier_byakuren_04_physical_buff")
end
if caster:HasModifier("modifier_byakuren_04_pure_buff") then
caster:RemoveModifierByName("modifier_byakuren_04_pure_buff")
end
elseif caster.thtd_byakuren_01_attack_time == base_tick then
if caster:HasModifier("modifier_byakuren_04_pure_buff") == false then
ability:ApplyDataDrivenModifier(caster,caster,"modifier_byakuren_04_pure_buff", nil)
end
if caster:HasModifier("modifier_byakuren_04_magic_buff") then
caster:RemoveModifierByName("modifier_byakuren_04_magic_buff")
end
if caster:HasModifier("modifier_byakuren_04_physical_buff") then
caster:RemoveModifierByName("modifier_byakuren_04_physical_buff")
end
elseif caster.thtd_byakuren_01_attack_time < base_tick then
if caster:HasModifier("modifier_byakuren_04_magic_buff") then
caster:RemoveModifierByName("modifier_byakuren_04_magic_buff")
end
if caster:HasModifier("modifier_byakuren_04_pure_buff") then
caster:RemoveModifierByName("modifier_byakuren_04_pure_buff")
end
end
else
if caster:HasModifier("modifier_byakuren_04_physical_buff") then
caster:RemoveModifierByName("modifier_byakuren_04_physical_buff")
end
if caster:HasModifier("modifier_byakuren_04_pure_buff") then
caster:RemoveModifierByName("modifier_byakuren_04_pure_buff")
end
if caster:HasModifier("modifier_byakuren_04_magic_buff") then
caster:RemoveModifierByName("modifier_byakuren_04_magic_buff")
end
end
end
function OnByakuren01AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if caster.thtd_byakuren_01_extra_damage == nil then
caster.thtd_byakuren_01_extra_damage = 100
end
local factor = 1 + THTD_GetStarLotusBuffedTowerCount(caster) * keys.damage_up / 100
local targets = THTD_FindUnitsInRadius(caster,target:GetOrigin(),keys.range)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * factor * caster.thtd_byakuren_01_extra_damage / 100
for k,v in pairs(targets) do
local damage_table = {
victim = v,
attacker = caster,
damage = damage,
ability = keys.ability,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE,
}
local base_tick = math.floor(keys.base_tick * 100 + 0.5) / 100
if caster.thtd_byakuren_01_attack_time == base_tick then
damage_table.damage_type = DAMAGE_TYPE_PURE
elseif caster.thtd_byakuren_01_attack_time > base_tick then
damage_table.damage_type = DAMAGE_TYPE_MAGICAL
elseif caster.thtd_byakuren_01_attack_time < base_tick then
damage_table.damage_type = DAMAGE_TYPE_PHYSICAL
end
UnitDamageTarget(damage_table)
end
local particle = ParticleManager:CreateParticle("particles/units/heroes/hero_abaddon/abaddon_aphotic_shield_explosion.vpcf",PATTACH_CUSTOMORIGIN,caster)
ParticleManager:SetParticleControl(particle,0,target:GetOrigin()+Vector(0,0,64))
ParticleManager:DestroyParticleSystem(particle,false)
end
function OnByakuren03SpellThink(keys)
if GameRules:IsGamePaused() then return end
if keys.ability == nil or keys.ability:GetLevel() < 1 then return end
local caster = EntIndexToHScript(keys.caster_entindex)
local targets = THTD_FindFriendlyUnitsInRadius(caster,caster:GetOrigin(),2500)
for k,v in pairs(targets) do
if v:HasModifier("modifier_byakuren_03_buff") == false then
if THTD_IsStarLotusTower(v) then
if v.thtd_byakuren_03_religious_count == nil then
v.thtd_byakuren_03_religious_count = 0
end
v.thtd_byakuren_03_religious_count = v.thtd_byakuren_03_religious_count + 1
SendOverheadEventMessage(v:GetPlayerOwner(), OVERHEAD_ALERT_BONUS_POISON_DAMAGE, v, v.thtd_byakuren_03_religious_count, v:GetPlayerOwner() )
if v.thtd_byakuren_03_religious_count > 6000 then
local unitName = v:GetUnitName()
if unitName == "nazrin" then
v.thtd_byakuren_buff_nazrin = keys.ability:GetSpecialValueFor("nazrin")
elseif unitName == "toramaru" then
v.thtd_byakuren_buff_toramaru = keys.ability:GetSpecialValueFor("toramaru")
elseif unitName == "kogasa" then
v.thtd_byakuren_buff_kogasa = keys.ability:GetSpecialValueFor("kogasa")
elseif unitName == "nue" then
v.thtd_byakuren_buff_nue = keys.ability:GetSpecialValueFor("nue")
elseif unitName == "minamitsu" then
v.thtd_byakuren_buff_minamitsu = keys.ability:GetSpecialValueFor("minamitsu")
elseif unitName == "kyouko" then
v.thtd_byakuren_buff_kyouko = keys.ability:GetSpecialValueFor("kyouko")
end
keys.ability:ApplyDataDrivenModifier(caster,v,"modifier_byakuren_03_buff", nil)
end
end
end
end
end
local thtd_byakuren_04_point =
{
[1] = Vector(-340,-145,32),
[2] = Vector(340,-145,32),
[3] = Vector(-185,220,32),
[0] = Vector(185,220,32),
}
function OnByakuren04AttackLanded(keys)
if keys.ability:GetLevel() < 1 then return end
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if caster.thtd_byakuren_04_init ~= true then
caster.thtd_byakuren_04_init = true
ByakurenUpdateBuff(caster)
end
local base_tick = math.floor(caster:GetAbilityValue("thtd_byakuren_01", "base_tick") * 100 + 0.5) / 100
if caster.thtd_byakuren_01_attack_time == nil then
caster.thtd_byakuren_01_attack_time = base_tick
end
if caster.thtd_byakuren_01_extra_damage == nil then
caster.thtd_byakuren_01_extra_damage = 100
end
local buffedCount = THTD_GetStarLotusBuffedTowerCount(caster)
local buffedBonus = keys.power_bonus
if caster.thtd_byakuren_01_attack_time > base_tick then
local targets = THTD_FindUnitsInRadius(caster,caster:GetOrigin(),keys.range)
if #targets > 0 then
local count = 1
local outCount = math.floor((keys.damage_count + buffedCount - 1)/#targets) + 1
local damageCount = {}
for iOut=1,outCount do
for i=1,#targets do
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_byakuren/ability_byakuren_04_laser.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetOrigin()+thtd_byakuren_04_point[count%4])
ParticleManager:SetParticleControl(effectIndex, 1, targets[i]:GetOrigin())
ParticleManager:SetParticleControl(effectIndex, 3, targets[i]:GetOrigin())
ParticleManager:SetParticleControl(effectIndex, 9, caster:GetOrigin()+thtd_byakuren_04_point[count%4])
ParticleManager:DestroyParticleSystemTime(effectIndex,2.0)
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_byakuren/ability_byakuren_04_item.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetOrigin()+thtd_byakuren_04_point[count%4])
ParticleManager:DestroyParticleSystemTime(effectIndex,1.0)
damageCount[i] = (damageCount[i] or 0) + 1
count = count + 1
if count > (keys.damage_count + buffedCount) then
break
end
end
if count > (keys.damage_count + buffedCount) then
break
end
end
-- PrintTable(damageCount)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * (caster.thtd_byakuren_01_extra_damage/100) * (1 + buffedCount * buffedBonus/100)
for i=1,#targets do
if damageCount[i] ~= nil then
local damage_table = {
victim = targets[i],
attacker = caster,
damage = damage * damageCount[i],
ability = keys.ability,
damage_type = DAMAGE_TYPE_MAGICAL,
damage_flags = DOTA_DAMAGE_FLAG_NONE,
}
UnitDamageTarget(damage_table)
end
end
end
return
end
if caster.thtd_byakuren_01_attack_time == base_tick then
if caster.thtd_byakuren_04_attack_count == nil then
caster.thtd_byakuren_04_attack_count = 0
end
caster.thtd_byakuren_04_attack_count = caster.thtd_byakuren_04_attack_count + 1
if caster.thtd_byakuren_04_attack_count >= keys.max_count / (1 + buffedCount * buffedBonus/100) then
caster.thtd_byakuren_04_attack_count = 0
local targets = THTD_FindUnitsInRadius(caster,caster:GetOrigin(),keys.range)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * (1 + buffedCount * buffedBonus/100)
for k,v in pairs(targets) do
local damage_table = {
victim = v,
attacker = caster,
damage = damage,
ability = keys.ability,
damage_type = DAMAGE_TYPE_PURE,
damage_flags = DOTA_DAMAGE_FLAG_NONE,
}
UnitDamageTarget(damage_table)
local particle = ParticleManager:CreateParticle("particles/heroes/byakuren/ability_byakuren_02.vpcf",PATTACH_CUSTOMORIGIN,caster)
ParticleManager:SetParticleControl(particle,0,v:GetOrigin())
ParticleManager:SetParticleControl(particle,1,v:GetOrigin())
ParticleManager:DestroyParticleSystem(particle,false)
end
end
return
end
if caster.thtd_byakuren_01_attack_time < base_tick then
if RollPercentage(keys.chance) and caster:HasModifier("modifier_byakuren_04_physical_buff") == false then
caster.byakuren_04_power_bonus = buffedCount * buffedBonus
keys.ability:ApplyDataDrivenModifier(caster,caster,"modifier_byakuren_04_physical_buff", {Duration = keys.duration_time})
end
end
end
function OnCreatedByakuren04PhysicalBuff(keys)
local target = keys.target
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_byakuren/ability_byakuren_04_phy.vpcf",PATTACH_CUSTOMORIGIN,target)
ParticleManager:SetParticleControl(effectIndex,0,target:GetOrigin()+Vector(0,0,32))
ParticleManager:DestroyParticleSystemTime(effectIndex, keys.duration_time)
target.thtd_byakuren_04_physical_buff_effect = effectIndex
local bonus = target.byakuren_04_power_bonus
target:THTD_AddPowerPercentage(bonus, "thtd_byakuren_04_physical_buff")
target:THTD_AddAttackPercentage(bonus, "thtd_byakuren_04_physical_buff")
target:THTD_AddAttackSpeed(keys.attack_speed, "thtd_byakuren_04_physical_buff")
target:THTD_AddBaseAttack(keys.attack_bonus, "thtd_byakuren_04_physical_buff")
target:THTD_AddBasePower(keys.attack_bonus, "thtd_byakuren_04_physical_buff")
end
function OnDestroyByakuren04PhysicalBuff(keys)
local target = keys.target
ParticleManager:DestroyParticleSystem(target.thtd_byakuren_04_physical_buff_effect, true)
target:THTD_AddPowerPercentage("thtd_byakuren_04_physical_buff")
target:THTD_AddAttackPercentage("thtd_byakuren_04_physical_buff")
target:THTD_AddAttackSpeed("thtd_byakuren_04_physical_buff")
target:THTD_AddBaseAttack("thtd_byakuren_04_physical_buff")
target:THTD_AddBasePower("thtd_byakuren_04_physical_buff")
end
function OnCreatedByakuren04PureBuff(keys)
local target = keys.target
target:THTD_AddCritDamage(keys.crit_damage, "thtd_byakuren_04_pure_buff")
target:THTD_AddCritChance(keys.crit_change, "thtd_byakuren_04_pure_buff")
end
function OnDestroyByakuren04PureBuff(keys)
local target = keys.target
target:THTD_AddCritDamage("thtd_byakuren_04_pure_buff")
target:THTD_AddCritChance("thtd_byakuren_04_pure_buff")
end
function OnCreatedByakuren04Buff(keys)
keys.target:AddDamageOutgoingMagical(keys.penetration, "thtd_byakuren_04_damage_up")
end
function OnDestroyByakuren04Buff(keys)
keys.target:AddDamageOutgoingMagical("thtd_byakuren_04_damage_up")
end

View File

@@ -0,0 +1,64 @@
function OnChen01SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
local rad = GetRadBetweenTwoVec2D(caster:GetOrigin(),targetPoint)
caster.thtd_chen_01_last_origin = caster:GetOrigin()
caster:StartGesture(ACT_DOTA_CAST_ABILITY_1)
keys.ability:ApplyDataDrivenModifier(caster,caster,"modifier_chen_01_pause", nil)
caster:SetContextThink(DoUniqueString("ability_chen_01_move"),
function ()
if GameRules:IsGamePaused() then return 0.03 end
if GetDistanceBetweenTwoVec2D(caster:GetOrigin(), targetPoint)>=30 and GetDistanceBetweenTwoVec2D(caster:GetOrigin(), targetPoint)<keys.ability:GetCastRange()
and caster:THTD_IsHidden() == false then
caster:SetAbsOrigin(caster:GetOrigin() + Vector(math.cos(rad),math.sin(rad),0)*30)
else
FindClearSpaceForUnit(caster, caster:GetOrigin(), false)
caster:THTD_DestroyLevelEffect()
caster:THTD_CreateLevelEffect()
caster:RemoveGesture(ACT_DOTA_CAST_ABILITY_1)
caster:RemoveModifierByName("modifier_chen_01_pause")
return nil
end
return 0.03
end,
0.03)
end
function OnChen01SpellThink(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if caster.thtd_chen_01_vector == nil then
caster.thtd_chen_01_vector = caster:GetOrigin()
end
if caster.thtd_chen_01_distance_increase == nil then
caster.thtd_chen_01_distance_increase = 100
end
local dis = GetDistanceBetweenTwoVec2D(caster:GetOrigin(), caster.thtd_chen_01_vector)
if dis > 30 and caster:THTD_IsHidden()==false then
caster.thtd_chen_01_vector = caster:GetOrigin()
caster:EmitSoundParams("Sound_THTD.thtd_chen_01",1.0,0.2*(1+(dis/caster.thtd_chen_01_distance_increase)/8),2.0)
local increase = GetDistanceBetweenTwoVec2D(caster.thtd_chen_01_vector, caster.thtd_chen_01_last_origin)/caster.thtd_chen_01_distance_increase
local targets = THTD_FindUnitsInRadius(caster,caster:GetOrigin(),400*(1+increase/8))
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * increase
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_chen/ability_chen_01.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetOrigin())
ParticleManager:SetParticleControl(effectIndex, 1, Vector(400*(1+increase/8),400*(1+increase/8),400*(1+increase/8)))
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
end

View File

@@ -0,0 +1,265 @@
function OnCirno02SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local damagedGroup = {}
Cirno02PassToNextUnit(keys,target,damagedGroup)
end
function Cirno02PassToNextUnit(keys,target,damagedGroup)
if keys.ability == nil or keys.ability:IsNull() then
damagedGroup = {}
return
end
local caster = EntIndexToHScript(keys.caster_entindex)
local targets = THTD_FindUnitsInRadius(caster,target:GetOrigin(),keys.radius)
local powerCount = 0
local powerDamage = 1
local pv = caster:GetAbilityPowerValue("thtd_cirno_02")
if pv ~= nil then
powerDamage = pv[1]
powerCount = pv[2]
end
caster.thtd_cirno02_power_crit = powerDamage
if targets[1]==nil or #damagedGroup >= keys.unit_max_count then
damagedGroup = {}
return
end
if #damagedGroup == 0 then
table.insert(damagedGroup,target)
local count = keys.ice_count + powerCount
caster:SetContextThink(DoUniqueString("thtd_cirno02_projectile"),
function()
if GameRules:IsGamePaused() then return 0.03 end
local info =
{
Target = target,
Source = caster,
Ability = keys.ability,
EffectName = "particles/heroes/thtd_cirno/ability_cirno_02.vpcf",
iMoveSpeed = 1400,
vSourceLoc= caster:GetAbsOrigin(), -- Optional (HOW)
bDrawsOnMinimap = false, -- Optional
bDodgeable = true, -- Optional
bIsAttack = false, -- Optional
bVisibleToEnemies = true, -- Optional
bReplaceExisting = false, -- Optional
flExpireTime = GameRules:GetGameTime() + 10, -- Optional but recommended
bProvidesVision = true, -- Optional
iVisionRadius = 400, -- Optional
iVisionTeamNumber = caster:GetTeamNumber() -- Optional
}
local projectile = ProjectileManager:CreateTrackingProjectile(info)
ParticleManager:DestroyLinearProjectileSystem(projectile,false)
if count > 0 then
count = count - 1
return 0.05
end
return nil
end,
0.05)
caster:SetContextThink(DoUniqueString("thtd_cirno02_projectile"),
function()
if GameRules:IsGamePaused() then return 0.03 end
Cirno02PassToNextUnit(keys,target,damagedGroup)
return nil
end,
0.5)
else
for k,v in pairs(targets) do
if v~=nil and v:IsNull()==false and THTD_IsUnitInGroup(v,damagedGroup) == false then
table.insert(damagedGroup,v)
local count = keys.ice_count + powerCount
caster:SetContextThink(DoUniqueString("thtd_cirno02_projectile"),
function()
if GameRules:IsGamePaused() then return 0.03 end
local info =
{
Target = v,
Source = target,
Ability = keys.ability,
EffectName = "particles/heroes/thtd_cirno/ability_cirno_02.vpcf",
iMoveSpeed = 1400,
vSourceLoc= caster:GetAbsOrigin(), -- Optional (HOW)
bDrawsOnMinimap = false, -- Optional
bDodgeable = true, -- Optional
bIsAttack = false, -- Optional
bVisibleToEnemies = true, -- Optional
bReplaceExisting = false, -- Optional
flExpireTime = GameRules:GetGameTime() + 10, -- Optional but recommended
bProvidesVision = true, -- Optional
iVisionRadius = 400, -- Optional
iVisionTeamNumber = caster:GetTeamNumber() -- Optional
}
projectile = ProjectileManager:CreateTrackingProjectile(info)
ParticleManager:DestroyLinearProjectileSystem(projectile,false)
if count > 0 then
count = count - 1
return 0.05
end
return nil
end,
0.05)
caster:SetContextThink(DoUniqueString("thtd_cirno02_projectile"),
function()
if GameRules:IsGamePaused() then return 0.03 end
Cirno02PassToNextUnit(keys,v,damagedGroup)
return nil
end,
0.1)
end
end
end
end
function OnCirno02SpellHit(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * caster.thtd_cirno02_power_crit
if caster:IsPower999() then
damage = damage * 9
end
local DamageTable = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
if RollPercentage(keys.chance) then
local stuntime = keys.StunTime
if caster:THTD_IsTowerEx() == true then
stuntime = stuntime * (1 + keys.stun_up/100)
end
keys.ability:ApplyDataDrivenModifier(caster,target,"modifier_cirno_frozen_unit", {Duration = stuntime})
end
if target.thtd_ability_cirno_02_damaged ~= true then
target.thtd_ability_cirno_02_damaged = true
target:SetContextThink(DoUniqueString("thtd_ability_cirno_02_damaged"),
function()
if GameRules:IsGamePaused() then return 0.03 end
target.thtd_ability_cirno_02_damaged = false
return nil
end,
3.0)
local effectIndex = ParticleManager:CreateParticle("particles/heroes/cirno/ability_cirno_02.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, target:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
caster:EmitSound("Sound_THTD.thtd_cirno_02")
end
end
function OnCirno03Attack(keys)
if keys.ability:GetLevel() < 1 then return end
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local effectIndex = ParticleManager:CreateParticle("particles/heroes/cirno/ability_cirno_02.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, target:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
if caster:IsPower666() then
damage = damage + 69 * caster:THTD_GetStarDamage()
end
if caster:IsPower999() then
damage = damage * 9
end
local targets = THTD_FindUnitsInRadius(caster,target:GetOrigin(),keys.range)
for k,v in pairs(targets) do
-- caster:PerformAttack(v,true,false,true,false,false,false,true) 造成攻击但不显示弹道
if caster:IsPower666() then
local effectIndex = ParticleManager:CreateParticle("particles/units/heroes/hero_crystalmaiden/maiden_freezing_field_explosion.vpcf", PATTACH_CUSTOMORIGIN, v)
ParticleManager:SetParticleControl(effectIndex, 0, v:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
end
function OnCirno04Attack(keys)
if keys.ability:GetLevel() < 1 then return end
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local targetPoint = target:GetOrigin()
if caster.thtd_cirno_04_attack_count == nil then
caster.thtd_cirno_04_attack_count = 0
end
caster.thtd_cirno_04_attack_count = caster.thtd_cirno_04_attack_count + 1
if caster.thtd_cirno_04_attack_count >= keys.max_count then
caster.thtd_cirno_04_attack_count = 0
local count = 1
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_cirno/ability_cirno_04_circle.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
ParticleManager:DestroyParticleSystem(effectIndex,false)
local powerDamage = 1
local pv = caster:GetAbilityPowerValue("thtd_cirno_04")
if pv ~= nil then
powerDamage = pv[1]
end
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * powerDamage
if caster:IsPower999() then
damage = damage * 9
end
caster:SetContextThink(DoUniqueString("thtd_cirno_04_spell_start"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if count%5 == 0 then
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.range)
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage * 5 * 0.05,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
end
if count > 40 then
return nil
end
caster:EmitSound("Sound_THTD.thtd_cirno_04")
count = count + 1
return 0.05
end,
0.05)
end
end
function OnCreatedCirnoExBuff(keys)
keys.target:AddDamageOutgoingMagical(keys.damage_up, "thtd_cirno_ex_damage_up")
end
function OnDestroyCirnoExBuff(keys)
keys.target:AddDamageOutgoingMagical("thtd_cirno_ex_damage_up")
end

View File

@@ -0,0 +1,219 @@
function OnSpellStartClownpiece01(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
if caster.thtd_clown_ball == nil then
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_hecatia/ability_hecatia_01_moon.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint + Vector(0,0,128))
ParticleManager:SetParticleControl(effectIndex, 1, Vector(0.3,0,0))
ParticleManager:SetParticleControl(effectIndex, 2, Vector(150,0,0))
caster.thtd_clown_ball =
{
["Vector"] = targetPoint + Vector(0,0,128),
["EffectIndex"] = effectIndex
}
else
caster.thtd_clown_ball["Vector"] = targetPoint + Vector(0,0,128)
ParticleManager:SetParticleControl(effectIndex, 0, caster.thtd_clown_ball["Vector"])
end
local powerDamage = 0
local pv = caster:GetAbilityPowerValue(keys.ability:GetAbilityName())
if pv ~= nil then
powerDamage = pv[1]/100
end
local range = keys.range
local count = 1
caster:SetContextThink(DoUniqueString("thtd_clownpiece_01_cast"),
function()
if GameRules:IsGamePaused() then return 0.03 end
count = count - 1
if count < 0 then
ClownpieceRemoveAllBall(keys)
return nil
end
for i=1,12 do
local forward1 = Vector(math.cos(i*math.pi/6),math.sin(i*math.pi/6),0)
local forward2 = Vector(math.cos(i*math.pi/6+math.pi/2),math.sin(i*math.pi/6+math.pi/2),0)
local startPoint = caster.thtd_clown_ball["Vector"]
local endPoint = caster.thtd_clown_ball["Vector"] + forward1 * range + Vector(0,0,128)
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_hecatia/ability_hecatia_moon_reflex.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex , 0, startPoint)
ParticleManager:SetParticleControl(effectIndex , 1, endPoint)
ParticleManager:SetParticleControl(effectIndex , 9, startPoint)
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
local targets = THTD_FindUnitsInRadius(caster,caster.thtd_clown_ball["Vector"],range)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * (1 + powerDamage)
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
return 0.5
end,
0.3)
end
function ClownpieceRemoveAllBall(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if caster.thtd_clown_ball ~= nil then
local effectIndex = caster.thtd_clown_ball["EffectIndex"]
ParticleManager:DestroyParticleSystem(effectIndex,true)
caster.thtd_clown_ball = nil
end
end
function OnSpellStartClownpiece02(keys)
local caster = keys.caster
local targetPoint = keys.target_points[1]
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_junko/ability_junko_03.vpcf", PATTACH_CUSTOMORIGIN, nil)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
ParticleManager:DestroyParticleSystem(effectIndex,false)
local powerRange = 0
local powerDuration = 0
local pv = caster:GetAbilityPowerValue(keys.ability:GetAbilityName())
if pv ~= nil then
powerRange = pv[1]
powerDuration = pv[2]
end
local radius = keys.radius + powerRange
local duration_time = keys.duration_time + powerDuration
local damage_up_other = keys.damage_up_other
local targets = THTD_FindUnitsInRadius(caster,targetPoint,radius)
local count = #targets
for k,v in pairs(targets) do
local modifier = v:FindModifierByName("modifier_clownpiece_debuff")
if modifier==nil then
keys.ability:ApplyDataDrivenModifier(caster,v,"modifier_clownpiece_debuff", {Duration = duration_time})
else
modifier:SetDuration(duration_time,false)
end
end
if count > 0 then
local powerDamageUp = 0
local pv = caster:GetAbilityPowerValue("thtd_clownpiece_02")
if pv ~= nil then
powerDamageUp = pv[3]
end
local factor = powerDamageUp + keys.damage_up_self
caster.thtd_clownpiece_02_buff_bonus = count * keys.damage_up_other
caster.thtd_clownpiece_02_self_bonus = caster.thtd_clownpiece_02_buff_bonus * factor
local hero = caster:GetOwner()
for k,v in pairs(hero.thtd_hero_tower_list) do
local unitName = v:GetUnitName()
if unitName == "clownpiece" or unitName == "lily" or unitName == "luna" or unitName == "star" or unitName == "sunny" or unitName == "cirno" or unitName == "daiyousei" or unitName == "mugiyousei" or unitName == "hanadayousei" or unitName == "maidyousei" then
v:RemoveModifierByName("modifier_clownpiece_buff")
keys.ability:ApplyDataDrivenModifier(caster,v,"modifier_clownpiece_buff", {Duration = duration_time}):SetStackCount(count)
end
end
end
end
function OnCreatedClownpiece02Buff(keys)
if keys.target:GetUnitName() == "clownpiece" then
keys.target:AddDamageOutgoingAll(keys.caster.thtd_clownpiece_02_self_bonus or 0, "thtd_clownpiece_02_bonus")
else
keys.target:AddDamageOutgoingAll(keys.caster.thtd_clownpiece_02_buff_bonus or 0, "thtd_clownpiece_02_bonus")
end
end
function OnDestroyClownpiece02Buff(keys)
keys.target:AddDamageOutgoingAll("thtd_clownpiece_02_bonus")
end
function OnSpellStartClownpiece03(keys)
local caster = keys.caster
local targetPoint = keys.target_points[1]
local casterPoint = caster:GetAbsOrigin()
local forward = (targetPoint - casterPoint):Normalized()
local powerDuration = 0
local pv = caster:GetAbilityPowerValue(keys.ability:GetAbilityName())
if pv ~= nil then
powerDuration = pv[2]
end
if caster:IsPower666() then
for i=1,6 do
local forward1 = Vector(math.cos(i*math.pi/3),math.sin(i*math.pi/3),0)
local effectIndex = ParticleManager:CreateParticle("particles/econ/items/jakiro/jakiro_ti8_immortal_head/jakiro_ti8_dual_breath_fire.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, casterPoint)
ParticleManager:SetParticleControl(effectIndex, 1, forward1 * keys.distance)
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
local targets = THTD_FindUnitsInRadius(caster,casterPoint,keys.distance + 100)
for k,v in pairs(targets) do
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_clownpiece_03_debuff", {Duration = keys.duration_time + powerDuration})
end
else
local effectIndex = ParticleManager:CreateParticle("particles/econ/items/jakiro/jakiro_ti8_immortal_head/jakiro_ti8_dual_breath_fire.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, casterPoint)
ParticleManager:SetParticleControl(effectIndex, 1, forward * keys.distance)
ParticleManager:DestroyParticleSystem(effectIndex,false)
-- local effectIndex2 = ParticleManager:CreateParticle("particles/econ/items/jakiro/jakiro_ti8_immortal_head/jakiro_ti8_dual_breath_ice.vpcf", PATTACH_CUSTOMORIGIN, caster)
-- ParticleManager:SetParticleControl(effectIndex2, 0, casterPoint)
-- ParticleManager:SetParticleControl(effectIndex2, 1, (targetPoint - casterPoint):Normalized() * 1000)
-- ParticleManager:DestroyParticleSystem(effectIndex2,false)
local targets = FindUnitsInLine(
caster:GetTeamNumber(),
casterPoint,
casterPoint + forward * (keys.distance + 100),
nil,
300,
keys.ability:GetAbilityTargetTeam(),
keys.ability:GetAbilityTargetType(),
keys.ability:GetAbilityTargetFlags()
)
for k,v in pairs(targets) do
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_clownpiece_03_debuff", {Duration = keys.duration_time + powerDuration})
end
end
end
function OnThinkClownpiece03(keys)
local caster = keys.caster
local target = keys.target
local powerDamage = 0
local pv = caster:GetAbilityPowerValue(keys.ability:GetAbilityName())
if pv ~= nil then
powerDamage = pv[1]
end
if caster:IsPower666() then powerDamage = powerDamage + 30 end
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) + powerDamage * caster:THTD_GetStarDamage()
if caster:IsPower999() then damage = damage * 3 end
damage = damage * keys.tick
local DamageTable = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,227 @@
function OnDaiyousei01SpellStart(keys)
if SpawnSystem.IsUnLimited then return end
if GameRules:GetCustomGameDifficulty() >= FUNNY_MODE then return end
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if target:GetPlayerOwnerID() ~= caster:GetPlayerOwnerID() then return end
caster:EmitSound("Hero_Enchantress.EnchantCreep")
if target:THTD_IsTower() and target~=caster and target:THTD_GetLevel()<THTD_MAX_LEVEL then
target:THTD_LevelUp(keys.level_up)
end
local count = keys.level_up - 1
local targets = THTD_FindFriendlyUnitsInRadius(caster,target:GetOrigin(),1200)
for k,v in pairs(targets) do
if count > 0 and v:THTD_IsTower() and v~=caster and v:THTD_GetLevel()<THTD_MAX_LEVEL and v~=target then
v:THTD_LevelUp(count)
count = count - 1
end
end
end
function OnDaiyousei02SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
caster:EmitSound("Sound_THTD.thtd_daiyousei_02")
local targets =
FindUnitsInRadius(
caster:GetTeamNumber(),
caster:GetOrigin(),
nil,
1000,
keys.ability:GetAbilityTargetTeam(),
keys.ability:GetAbilityTargetType(),
keys.ability:GetAbilityTargetFlags(),
FIND_ANY_ORDER,
false
)
local effectIndex = ParticleManager:CreateParticle("particles/thd2/items/item_yatagarasu.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex , 0 , caster:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
for k,v in pairs(targets) do
if IsInDaiyousei02BlackList(v) == false then
v:GiveMana(keys.mana_reg)
local effectIndex = ParticleManager:CreateParticle("particles/heroes/daiyousei/ability_daiyousei_02.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex , 0 , v:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
end
end
local daiyousei_02_black_list =
{
"lily",
"daiyousei",
"youmu",
}
function IsInDaiyousei02BlackList(unit)
for k,v in pairs(daiyousei_02_black_list) do
if unit:GetUnitName() == v then
return true
end
end
return false
end
function OnDaiyousei03SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if caster == target then return end
if not target:THTD_IsTower() then return end
if target:HasModifier("modifier_daiyousei_03") then return end
if target:GetPlayerOwnerID() ~= caster:GetPlayerOwnerID() then return end
caster:EmitSound("Hero_Wisp.Tether.Target")
keys.ability:ApplyDataDrivenModifier(caster, target, "modifier_daiyousei_03", nil)
local effectIndex = Daiyousei03CreateLine(caster,target)
local hasCombo = caster:HasModifier("modifier_thtd_daiyousei_03_combo_buff")
if hasCombo then
if THTD_IsValid(caster.ability_daiyousei_03_target1) == false then
caster.ability_daiyousei_03_target1 = target
elseif THTD_IsValid(caster.ability_daiyousei_03_target2) == false then
caster.ability_daiyousei_03_target2 = target
else
caster.ability_daiyousei_03_target1 = caster.ability_daiyousei_03_target2
caster.ability_daiyousei_03_target2 = target
end
else
caster.ability_daiyousei_03_target1 = target
end
target:SetContextThink(DoUniqueString("modifier_daiyousei_03"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if target == nil or target:IsNull() or target:IsAlive() == false then
ParticleManager:DestroyParticleSystem(effectIndex,true)
if caster ~= nil and caster:IsNull() == false then
if caster.ability_daiyousei_03_target1 == target then
caster.ability_daiyousei_03_target1 = nil
elseif caster.ability_daiyousei_03_target2 == target then
caster.ability_daiyousei_03_target2 = nil
end
end
return nil
end
local isCancel = false
if THTD_IsValid(caster) == false then
isCancel = true
if caster ~= nil and caster:IsNull() == false then
caster.ability_daiyousei_03_target1 = nil
caster.ability_daiyousei_03_target2 = nil
end
else
if caster:HasModifier("modifier_thtd_daiyousei_03_combo_buff") == false then
if caster.ability_daiyousei_03_target2 ~= nil then
caster.ability_daiyousei_03_target1 = caster.ability_daiyousei_03_target2
caster.ability_daiyousei_03_target2 = nil
end
end
isCancel = (caster.ability_daiyousei_03_target1 ~= target and caster.ability_daiyousei_03_target2 ~= target)
end
if isCancel then
if target:HasModifier("modifier_daiyousei_03") then
target:RemoveModifierByName("modifier_daiyousei_03")
end
ParticleManager:DestroyParticleSystem(effectIndex,true)
if caster ~= nil and caster:IsNull() == false then
if caster.ability_daiyousei_03_target1 == target then
caster.ability_daiyousei_03_target1 = nil
elseif caster.ability_daiyousei_03_target2 == target then
caster.ability_daiyousei_03_target2 = nil
end
end
return nil
end
return 0.2
end,
0)
end
function Daiyousei03CreateLine(caster,target)
local effectIndex = ParticleManager:CreateParticle("particles/heroes/daiyousei/ability_daiyousei_03.vpcf", PATTACH_CUSTOMORIGIN, target)
ParticleManager:SetParticleControlEnt(effectIndex , 0, caster, 5, "attach_hitloc", Vector(0,0,0), true)
ParticleManager:SetParticleControlEnt(effectIndex , 1, target, 5, "attach_hitloc", Vector(0,0,0), true)
return effectIndex
end
function OnCreatedDaiyousei03Buff(keys)
local target = keys.target
local bonus = 0
if target:GetUnitName() == "cirno" then
bonus = keys.crino_up
else
bonus = keys.damage_up
end
target:AddDamageOutgoingMagical(bonus, "thtd_daiyousei_03_damage_up")
end
function OnUpgradeDaiyousei03Buff(keys)
local caster = keys.caster
local targets = {}
if caster.ability_daiyousei_03_target1 ~= nil then
table.insert(targets, caster.ability_daiyousei_03_target1)
end
if caster.ability_daiyousei_03_target2 ~= nil then
table.insert(targets, caster.ability_daiyousei_03_target2)
end
for _,target in pairs(targets) do
local bonus = 0
if target:GetUnitName() == "cirno" then
bonus = keys.crino_up
else
bonus = keys.damage_up
end
target:AddDamageOutgoingMagical(bonus, "thtd_daiyousei_03_damage_up")
end
targets = {}
end
function OnDestroyDaiyousei03Buff(keys)
keys.target:AddDamageOutgoingMagical("thtd_daiyousei_03_damage_up")
end
function OnDaiyousei04SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if caster.thtd_ability_daiyousei_04_lock == nil then caster.thtd_ability_daiyousei_04_lock = false end
if target:GetUnitName() == "cirno" and target:THTD_GetStar() == 5 and caster.thtd_ability_daiyousei_04_lock == false then
target:EmitSound("Hero_Wisp.Tether")
caster.thtd_ability_daiyousei_04_lock = true
target:THTD_UpgradeEx()
target:SetAttackCapability(DOTA_UNIT_CAP_MELEE_ATTACK)
target:SetModel("models/new_touhou_model/cirno/ex/ex_cirno.vmdl")
target:SetOriginalModel("models/new_touhou_model/cirno/ex/ex_cirno.vmdl")
local modifier = target:AddNewModifier(target, nil, "modifier_attack_time", {})
modifier:SetStackCount(6) -- 8对应0.85对应0.56对应0.6
local mana_regen_ability =target:FindAbilityByName("ability_common_mana_regen_buff")
if mana_regen_ability ~= nil then
if mana_regen_ability:GetLevel() < mana_regen_ability:GetMaxLevel() then
mana_regen_ability:SetLevel(5)
end
end
local ability = target:FindAbilityByName("thtd_cirno_01")
if ability ~= nil and target:HasModifier("modifier_cirno_suwako_aura") == false then
ability:ApplyDataDrivenModifier(target, target, "modifier_cirno_suwako_aura", nil)
end
end
end

View File

@@ -0,0 +1,324 @@
thtd_eirin_01 = class({})
function thtd_eirin_01:OnProjectileHit_ExtraData( hTarget, vLocation, data )
local caster = self:GetCaster()
local target = hTarget
-- local source = data.attacker -- 注意不支持 table类型数据会返回 nil
local source = EntIndexToHScript(data.attacker_entindex)
-- print("caster : ", caster:GetUnitName())
-- print("attacker : ", source:GetUnitName())
caster:RemoveGesture(ACT_DOTA_CAST_ABILITY_1)
if IsValidAlive(target) then
target:EmitSound("Sound_THTD.thtd_eirin_01.end")
local damage = caster:THTD_GetAbilityPowerDamage(caster:FindAbilityByName("thtd_eirin_01"))
local DamageTable = {
ability = self,
victim = target,
attacker = caster,
damage = damage,
damage_type = self:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
Eirin01HitCount(caster)
end
return false
end
function OnEirin01TrackingProjectileToTarget(caster,target,attacker)
local ability = caster:FindAbilityByName("thtd_eirin_01")
local manaCost = ability:GetSpecialValueFor("mana_cost")
local manaBonus = ability:GetSpecialValueFor("mana_bonus")/100
local manaChance = ability:GetSpecialValueFor("mana_chance")
if caster:GetMana() >= manaCost then
if RollPercentage(caster:THTD_GetStar() * manaChance) then
caster:SetMana(math.min(caster:GetMaxMana(), caster:GetMana() - manaCost + caster:GetMaxMana() * manaBonus))
else
caster:SetMana(caster:GetMana() - manaCost)
end
local now = GameRules:GetGameTime()
if now - (target.thtd_eirin_01_project or 0) < 1 then
local delay = GetDistanceBetweenTwoVec2D(caster:GetAbsOrigin(), target:GetAbsOrigin()) / 1400
caster:SetContextThink(DoUniqueString("dota_timer"),
function()
if GameRules:IsGamePaused() then return 0.1 end
if IsValidAlive(target) then
local ability = caster:FindAbilityByName("thtd_eirin_01")
local damage = caster:THTD_GetAbilityPowerDamage(ability)
local DamageTable = {
ability = ability,
victim = target,
attacker = caster,
damage = damage,
damage_type = ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
Eirin01HitCount(caster)
end
return nil
end,
delay)
return
end
target.thtd_eirin_01_project = now
caster:StartGesture(ACT_DOTA_CAST_ABILITY_1)
local info =
{
Target = target,
Source = caster,
Ability = ability,
EffectName = "particles/heroes/thtd_eirin/ability_eirin_01.vpcf",
iMoveSpeed = 1400,
vSourceLoc= caster:GetAbsOrigin(), -- Optional (HOW)
bDrawsOnMinimap = false, -- Optional
bDodgeable = true, -- Optional
bIsAttack = false, -- Optional
bVisibleToEnemies = true, -- Optional
bReplaceExisting = false, -- Optional
flExpireTime = GameRules:GetGameTime() + 10, -- Optional but recommended
bProvidesVision = true, -- Optional
iVisionRadius = 400, -- Optional
iVisionTeamNumber = caster:GetTeamNumber(), -- Optional
ExtraData = { -- 注意,只支持简单类型,不支持 table数据
attacker_entindex = attacker:GetEntityIndex()
}
}
local projectile = ProjectileManager:CreateTrackingProjectile(info)
ParticleManager:DestroyLinearProjectileSystem(projectile,false)
end
end
function OnDestroyEirin01Count(keys)
local caster = keys.caster
caster.thtd_eirin_01_count_lock = true
caster:SetContextThink(DoUniqueString("dota_timer"),
function()
if GameRules:IsGamePaused() then return 0.1 end
caster.thtd_eirin_01_count_lock = nil
return nil
end,
0.2)
local factor = math.floor(caster.thtd_eirin_01_count/50)
if factor > 0 then
local power = keys.power_bonus * factor
local crit = keys.crit_bonus * factor
local chance = keys.crit_chance * factor
caster:THTD_AddBasePower(power)
caster:THTD_AddBaseAttack(power)
caster:THTD_AddCritChance(chance)
caster:THTD_AddCritDamage(crit)
local effectIndex = ParticleManager:CreateParticle("particles/units/heroes/hero_legion_commander/legion_commander_duel_victory.vpcf", PATTACH_CUSTOMORIGIN, caster) --PATTACH_OVERHEAD_FOLLOW
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetAbsOrigin() + Vector(0, 0, 410))
local time = 25.0
caster:SetContextThink(DoUniqueString("dota_timer"),
function()
if GameRules:IsGamePaused() then return 0.1 end
if time < 0 then
caster:THTD_AddBasePower(-power)
caster:THTD_AddBaseAttack(-power)
caster:THTD_AddCritChance(-chance)
caster:THTD_AddCritDamage(-crit)
return nil
end
time = time - 0.2
return 0.2
end,
0)
end
ParticleManager:DestroyParticleSystem(caster.thtd_eirin_01_count_effect, true)
caster.thtd_eirin_01_count_effect = nil
caster.thtd_eirin_01_count = 0
end
function Eirin01HitCount(caster)
if caster.thtd_eirin_01_count_lock == true then
return
end
if not caster:HasModifier("modifier_eirin_01_count") then
caster:FindAbilityByName("thtd_eirin_02"):ApplyDataDrivenModifier(caster, caster, "modifier_eirin_01_count", {duration = SpawnSystem.CurTime})
local effectName = "particles/addons_gameplay/morokai_orb_overhead_counter.vpcf"
local effectIndex = ParticleManager:CreateParticle(effectName, PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetAbsOrigin() + Vector(0, 0, 410))
ParticleManager:SetParticleControl(effectIndex, 2, Vector(1, 0, 0))
caster.thtd_eirin_01_count_effect = effectIndex
end
caster.thtd_eirin_01_count = (caster.thtd_eirin_01_count or 0) + 1
if caster.thtd_eirin_01_count > 500 then
caster.thtd_eirin_01_count = 500
return
end
local one = math.floor(caster.thtd_eirin_01_count/100)
local two = math.floor((caster.thtd_eirin_01_count - one * 100)/10)
local three = caster.thtd_eirin_01_count - one * 100 - two * 10
if three == 0 then three = 1 end
ParticleManager:SetParticleControl(caster.thtd_eirin_01_count_effect, 2, Vector(three, two, one))
end
function OnEirin02AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local range = caster:Script_GetAttackRange()
local targets = THTD_FindUnitsInRadius(caster,caster:GetOrigin(),range)
if #targets > 0 then
local target = nil
local index = RandomInt(1, #targets)
for k,v in pairs(targets) do
index = index - 1
if THTD_IsValid(v) and index == 0 then
target = v
break
end
end
local ability = caster:FindAbilityByName("thtd_eirin_01")
if target ~= nil and ability ~= nil then
OnEirin01TrackingProjectileToTarget(caster,target,keys.attacker)
end
end
end
function OnEirin03SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
local hero = caster:GetOwner()
if hero.thtd_eirin_03_lock == nil then
hero.thtd_eirin_03_lock = false
end
if hero.thtd_eirin_03_lock == true then
return
end
hero.thtd_eirin_03_lock = true
caster:EmitSound("Sound_THTD.thtd_eirin_02")
local time = keys.duration_time
local range = keys.range
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_eirin/ability_eirin_03.vpcf", PATTACH_CUSTOMORIGIN, nil)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
ParticleManager:SetParticleControl(effectIndex, 1, Vector(range,0,0))
ParticleManager:SetParticleControl(effectIndex, 2, Vector(range,0,0))
ParticleManager:SetParticleControl(effectIndex, 4, targetPoint)
ParticleManager:SetParticleControl(effectIndex, 15, targetPoint)
local effectIndex2 = ParticleManager:CreateParticle("particles/heroes/thtd_eirin/ability_eirin_03_aeons.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex2, 0, targetPoint)
ParticleManager:SetParticleControl(effectIndex2, 1, Vector(range,range,range))
local hitblockTag = DoUniqueString("hitblock")
local hitblock = {
circlePoint = targetPoint,
radius = range,
tag = hitblockTag,
}
table.insert(THTD_Custom_Hit_Block,hitblock)
caster:SetContextThink(DoUniqueString("thtd_eirin_03_spell_think"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if time <= 0 then
ParticleManager:DestroyParticleSystem(effectIndex,true)
ParticleManager:DestroyParticleSystem(effectIndex2,true)
for index,block in pairs(THTD_Custom_Hit_Block) do
if block.tag == hitblockTag then
table.remove(THTD_Custom_Hit_Block,index)
end
end
hero.thtd_eirin_03_lock = false
return nil
end
time = time - 0.1
local targets = THTD_FindUnitsInRadius(caster,targetPoint,450)
for k,v in pairs(targets) do
if GetDistanceBetweenTwoVec2D(targetPoint, v:GetOrigin()) > range then
local forward = (v:GetAbsOrigin() - targetPoint):Normalized()
v:SetAbsOrigin(targetPoint+forward*range)
end
end
return 0.1
end,
0.1)
end
function OnEirin04SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local vecCaster = keys.target_points[1]
local targetPoint = keys.target_points[1]
local pointRad = 0
if GetHitCustomBlock(vecCaster,targetPoint) ~= nil then
return
end
caster:EmitSound("Sound_THTD.thtd_eirin_04")
local maxRad = math.pi*150/180
for i=0,36 do
local forwardVec = Vector(math.cos(pointRad-maxRad/2+maxRad/12*i)*1500,math.sin(pointRad-maxRad/2+maxRad/12*i)*1500,0):Normalized()
local BulletTable = {
Ability = keys.ability,
EffectName = "particles/heroes/thtd_eirin/ability_eirin_04.vpcf",
vSpawnOrigin = vecCaster,
vSpawnOriginNew = vecCaster,
fDistance = 5000,
fStartRadius = 120,
fEndRadius = 120,
Source = caster,
bHasFrontalCone = false,
bRepalceExisting = false,
iUnitTargetTeams = "DOTA_UNIT_TARGET_TEAM_ENEMY",
iUnitTargetTypes = "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_CREEP",
iUnitTargetFlags = "DOTA_UNIT_TARGET_FLAG_NONE",
fExpireTime = GameRules:GetGameTime() + 10.0,
bDeleteOnHit = false,
vVelocity = forwardVec,
bProvidesVision = true,
iVisionRadius = 400,
iVisionTeamNumber = caster:GetTeamNumber(),
iReflexCount = 0,
bReflexByBlock = true,
}
if i%2 == 0 then
BulletTable.EffectName = "particles/heroes/thtd_eirin/ability_eirin_04_red.vpcf"
end
CreateProjectileMoveToTargetPoint(BulletTable,caster,2000,0,0,
function(v,vecProjectile,reflexCount)
if v:IsNull()==false and v~=nil then
local damage_table = {
victim = v,
attacker = caster,
ability = keys.ability,
damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * (1 + reflexCount * keys.damage_up / 100),
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = keys.ability:GetAbilityTargetFlags()
}
UnitDamageTarget(damage_table)
end
end
)
end
end

View File

@@ -0,0 +1,217 @@
function OnFlandre01SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if caster.thtd_flandre_illusion_table == nil then
caster.thtd_flandre_illusion_table = {}
end
caster:EmitSound("Hero_PhantomLancer.Doppelganger.Appear")
for i=1,3 do
local illusion = CreateUnitByName(
"flandre_illusion",
caster:GetOrigin() + Vector(math.cos(math.pi/2*(i+1)),math.sin(math.pi/2*(i+1)),0)*100,
false,
caster,
caster,
caster:GetTeam()
)
illusion:SetControllableByPlayer(caster:GetPlayerOwnerID(), true)
illusion:MoveToPosition(illusion:GetOrigin()+Vector(0,-100,0))
illusion:SetForwardVector(caster:GetForwardVector())
keys.ability:ApplyDataDrivenModifier(caster, illusion, "modifier_flandre_01_illusion", nil)
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_flandre/ability_flandre_02_fire.vpcf", PATTACH_CUSTOMORIGIN, illusion)
ParticleManager:SetParticleControlEnt(effectIndex , 0, illusion, 5, "attach_attack1", Vector(0,0,0), true)
caster.thtd_flandre_illusion_table[i] = illusion
local count = 0
illusion:SetContextThink(DoUniqueString("thtd_flandre_01_illusion"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if count > 20 or THTD_IsValid(caster) == false then
illusion:AddNoDraw()
illusion:ForceKill(true)
return nil
elseif caster:IsAttacking()==false then
illusion:RemoveGesture(ACT_DOTA_ATTACK)
illusion:MoveToPosition(illusion:GetOrigin()+Vector(0,-100,0))
end
count = count + 1
return 0.5
end,
0)
end
end
function OnFlandre02Created(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_flandre/ability_flandre_02_fire.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControlEnt(effectIndex , 0, caster, 5, "attach_attack1", Vector(0,0,0), true)
caster.thtd_flandre_02_effectIndex = effectIndex
end
function OnFlandre02AttackStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if caster.thtd_flandre_illusion_table == nil then
caster.thtd_flandre_illusion_table = {}
end
for k,v in pairs(caster.thtd_flandre_illusion_table) do
if v~=nil and v:IsNull()==false and v:IsAlive() then
local forward = (target:GetOrigin() - v:GetOrigin()):Normalized()
v:StartGesture(ACT_DOTA_ATTACK)
v:MoveToTargetToAttack(target)
end
end
end
function OnFlandre02AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local ability4 = caster:FindAbilityByName("thtd_flandre_04")
if ability4:GetLevel() >= 1 then
if caster.lock_target ~= target then
if THTD_IsValid(caster.lock_target) then
caster.lock_target:RemoveModifierByName("modifier_flandre_damage_lock")
end
keys.ability:ApplyDataDrivenModifier(caster, target, "modifier_flandre_damage_lock", {duration = 2.0})
caster.lock_target = target
else
local modifier = target:FindModifierByName("modifier_flandre_damage_lock")
if modifier ~= nil then
modifier:SetDuration(2.0, false)
else
keys.ability:ApplyDataDrivenModifier(caster, target, "modifier_flandre_damage_lock", {duration = 2.0})
end
end
if ability4:IsCooldownReady() then
target.flandre_04_lock = true
else
target.flandre_04_lock = false
end
end
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * 4
local crit = 1
local ability3 = caster:FindAbilityByName("thtd_flandre_03")
if ability3:GetLevel() > 0 then
crit = 1 + (100 - target:GetHealthPercent()) * ability3:GetSpecialValueFor("damage_up") / 100
end
local DamageTable = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = damage * crit,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
OnFlandre02SpellStart(caster)
end
function OnFlandre02SpellStart(caster)
local step = caster:GetAbilityValue("thtd_flandre_02", "damage_up") * 4
local maxUp = caster:GetAbilityValue("thtd_flandre_02", "max_up")
local duration = caster:GetAbilityValue("thtd_flandre_02", "duration_time")
if caster.thtd_flandre_02_outgoing == nil then
caster.thtd_flandre_02_outgoing = 0
end
local count = math.min(step, maxUp - caster.thtd_flandre_02_outgoing)
if count > 0 then
caster:AddDamageOutgoingPhysical(count)
caster.thtd_flandre_02_outgoing = caster.thtd_flandre_02_outgoing + count
caster:SetContextThink(DoUniqueString("modifier_flandre_02_buff_count"),
function()
if GameRules:IsGamePaused() then return 0.03 end
caster:AddDamageOutgoingPhysical(-count)
caster.thtd_flandre_02_outgoing = caster.thtd_flandre_02_outgoing - count
return nil
end,
duration)
end
end
function OnFlandre02Destroy(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
ParticleManager:DestroyParticleSystem(caster.thtd_flandre_02_effectIndex,false)
end
function OnCreatedFlandreLock(keys)
local target = keys.target
local effectIndex = ParticleManager:CreateParticle("particles/units/heroes/hero_bounty_hunter/bounty_hunter_track_trail.vpcf", PATTACH_POINT_FOLLOW, target)
ParticleManager:SetParticleControlEnt(effectIndex , 0, target, PATTACH_ABSORIGIN_FOLLOW, "attach_hitloc", target:GetAbsOrigin(), true)
ParticleManager:SetParticleControlEnt(effectIndex , 1, target, PATTACH_POINT_FOLLOW, "attach_hitloc", target:GetAbsOrigin(), true)
target.flandre_damage_lock_effect1 = effectIndex
local effectIndex = ParticleManager:CreateParticle("particles/units/heroes/hero_bounty_hunter/bounty_hunter_track_shield.vpcf", PATTACH_OVERHEAD_FOLLOW, target)
target.flandre_damage_lock_effect2 = effectIndex
target.flandre_damage_lock = true
end
function OnDestroyFlandreLock(keys)
local target = keys.target
ParticleManager:DestroyParticleSystem(target.flandre_damage_lock_effect1,true)
ParticleManager:DestroyParticleSystem(target.flandre_damage_lock_effect2,true)
target.flandre_damage_lock = false
end
function OnFlandre04SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local ability = keys.ability
if caster:IsPower999() then
local bonusCastCount = 4
caster:SetContextThink(DoUniqueString("thtd_flandre_04_power999"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if bonusCastCount <= 0 then return nil end
if THTD_IsValid(caster) and THTD_IsValid(target) then
Flandre04SpellCast(caster, target, ability)
bonusCastCount = bonusCastCount - 1
return 0.25
else
return nil
end
end,
0)
else
Flandre04SpellCast(caster, target, ability)
end
end
function Flandre04SpellCast(caster, target, ability)
-- target:StartGesture(ACT_DOTA_DIE)
caster:EmitSound("Hero_DoomBringer.LvlDeath")
local damage = caster:THTD_GetAbilityPowerDamage(ability) * 4
local crit = 1
local ability3 = caster:FindAbilityByName("thtd_flandre_03")
if ability3:GetLevel() > 0 then
crit = 1 + (100 - target:GetHealthPercent()) * ability3:GetSpecialValueFor("damage_up") / 100
end
local DamageTable = {
ability = ability,
victim = target,
attacker = caster,
damage = damage * crit,
damage_type = ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
OnFlandre02SpellStart(caster)
end

View File

@@ -0,0 +1,184 @@
function OnFuto01AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if caster.thtd_futo_01_effct_index == nil then
caster.thtd_futo_01_effct_index = 1
end
if caster.thtd_futo_01_effct_index == 1 then
local damage = caster:THTD_GetStarDamage() * keys.damage1 * (1 + GetFuto02Buff(caster))
local targets =
FindUnitsInLine(
caster:GetTeamNumber(),
target:GetOrigin(),
target:GetOrigin() + 800 * -target:GetForwardVector(),
nil,
200,
keys.ability:GetAbilityTargetTeam(),
keys.ability:GetAbilityTargetType(),
keys.ability:GetAbilityTargetFlags()
)
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
elseif caster.thtd_futo_01_effct_index == 2 then
if caster.__foto_lock ~= true then
caster.__foto_lock = true
local targets = THTD_FindUnitsInRadius(caster,caster:GetOrigin(),1200)
local damage = caster:THTD_GetStarDamage() * keys.damage2 * (1 + GetFuto02Buff(caster))
for i=1,#targets do
local unit = targets[i]
if unit~=nil and unit:IsNull()==false and unit~=target and unit:IsAlive() then
caster:PerformAttack(unit,false,false,false,false,true,false,false)
local DamageTable = {
ability = keys.ability,
victim = unit,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
end
caster.__foto_lock = false
end
elseif caster.thtd_futo_01_effct_index == 3 then
local targets = THTD_FindUnitsInRadius(caster,target:GetOrigin(),keys.range)
local damage = caster:THTD_GetStarDamage() * keys.damage3 * 0.3 * (1 + GetFuto02Buff(caster))
for k,v in pairs(targets) do
local time = keys.duration_time
v:AddPoison(1, caster)
v:SetContextThink(DoUniqueString("thtd_futo_01_damage_think"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if time <= 0 then
v:AddPoison(-1)
return nil
end
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
time = time - 0.3
return 0.3
end,
0.3)
end
elseif caster.thtd_futo_01_effct_index == 4 then
local targets = THTD_FindUnitsInRadius(caster,target:GetOrigin(),keys.range)
local damage = caster:THTD_GetStarDamage() * keys.damage4 * (1 + GetFuto02Buff(caster))
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_futo/ability_thtd_futo_01_fire.vpcf", PATTACH_CUSTOMORIGIN, target)
ParticleManager:SetParticleControl(effectIndex, 0, target:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
elseif caster.thtd_futo_01_effct_index == 5 then
local targets = THTD_FindUnitsInRadius(caster,target:GetOrigin(),keys.range)
for k,v in pairs(targets) do
if not v:HasModifier("modifier_futo_01_lock") then
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_futo_01_lock", {Duration = 1.0})
UnitStunTarget(caster,v,keys.stun_time)
end
end
elseif caster.thtd_futo_01_effct_index == 6 then
local targets = THTD_FindUnitsInRadius(caster,target:GetOrigin(),keys.range)
local damage = keys.attack_damage * keys.crit * (1 + GetFuto02Buff(caster))
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
SendOverheadEventMessage(caster:GetPlayerOwner(), OVERHEAD_ALERT_CRITICAL, v, damage, caster:GetPlayerOwner() )
end
end
caster.thtd_futo_01_effct_index = RandomInt(1,6)
caster:SetRangedProjectileName("particles/heroes/thtd_futo/ability_futo_base_attack_"..caster.thtd_futo_01_effct_index..".vpcf")
end
function OnFuto02Kill(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local modifier = caster:FindModifierByName("modifier_futo_02_buff")
if modifier==nil then
modifier = keys.ability:ApplyDataDrivenModifier(caster, caster, "modifier_futo_02_buff", {Duration = keys.duration_time})
modifier:SetStackCount(1)
else
if modifier:GetStackCount() < keys.max_count then
modifier:SetStackCount(modifier:GetStackCount()+1)
end
modifier:SetDuration(keys.duration_time,false)
end
end
function GetFuto02Buff(caster)
local modifier = caster:FindModifierByName("modifier_futo_02_buff")
if modifier~=nil then
return modifier:GetStackCount() * caster:GetAbilityValue("thtd_futo_02", "damage_up", true)
end
return 0
end
function OnFuto03SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_futo/ability_thtd_futo_03.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
ParticleManager:DestroyParticleSystem(effectIndex,false)
local time = keys.duration_time
caster:SetContextThink(DoUniqueString("thtd_futo_03_spell_think"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if time <= 0 then return nil end
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.range)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * 0.2 * (1 + GetFuto02Buff(caster))
if caster:HasModifier("modifier_miko_02_buff") and caster.thtd_miko_buff_futo03 ~= nil then
damage = damage * (1 + caster.thtd_miko_buff_futo03/100)
end
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
time = time - 0.2
return 0.2
end,
0)
end

View File

@@ -0,0 +1,31 @@
function OnHanadayousei01Attack(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local powerCount = 0
local powerRange = 0
local pv = caster:GetAbilityPowerValue(keys.ability:GetAbilityName())
if pv ~= nil then
powerCount = pv[1]
powerRange = pv[2]
end
if caster.__hanadayousei_lock ~= true then
caster.__hanadayousei_lock = true
local targets = THTD_FindUnitsInRadius(caster,caster:GetOrigin(), 800 + powerRange)
local count = 0
for i=1,#targets do
local unit = targets[i]
if unit~=nil and unit:IsNull()==false and unit~=target and unit:IsAlive() then
caster:PerformAttack(unit,true,false,true,false,true,false,true)
count = count + 1
end
if powerCount ~= 99 then
if count >= (3 + powerCount) then
break
end
end
end
caster.__hanadayousei_lock = false
end
end

View File

@@ -0,0 +1,112 @@
function OnHatate01SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_hatate/ability_hatate_01_news.vpcf",PATTACH_CUSTOMORIGIN,caster)
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetOrigin()+caster:GetForwardVector()*60)
ParticleManager:DestroyParticleSystem(effectIndex,false)
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.range)
for _,v in pairs(targets) do
if v:HasModifier("modifier_hatate01_news_buff") == false and v:HasModifier("modifier_aya01_news_buff") == false then
end
end
local deal_damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
for k,v in pairs(targets) do
local modifier = v:FindModifierByName("modifier_hatate01_news_buff")
if modifier == nil then
modifier = v:FindModifierByName("modifier_aya01_news_buff")
end
if modifier == nil then
modifier = keys.ability:ApplyDataDrivenModifier(caster,v,"modifier_hatate01_news_buff", nil)
elseif modifier:GetStackCount() < 999 then
modifier:IncrementStackCount()
end
local crit = 1.0
if modifier ~= nil then
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_hatate/ability_hatate_01.vpcf",PATTACH_CUSTOMORIGIN,caster)
ParticleManager:SetParticleControl(effectIndex, 0, v:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
crit = crit + modifier:GetStackCount() * caster:GetAbilityValue("thtd_hatate_01", "damage_up", true)
end
local damage_table = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = deal_damage * crit,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = 0
}
UnitDamageTarget(damage_table)
end
end
function OnHatate01AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if caster.__thtd_hatate_01_lock == true then return end
caster.__thtd_hatate_01_lock = true
local entities = THTD_FindUnitsAll(caster)
for k,v in pairs(entities) do
if v:HasModifier("modifier_hatate01_news_buff") or v:HasModifier("modifier_aya01_news_buff") then
local modifier = v:FindModifierByName("modifier_hatate01_news_buff")
if modifier == nil then
modifier = v:FindModifierByName("modifier_aya01_news_buff")
end
if modifier == nil then
modifier = keys.ability:ApplyDataDrivenModifier(caster,v,"modifier_hatate01_news_buff", nil)
elseif modifier:GetStackCount() < 999 then
modifier:IncrementStackCount()
end
end
end
caster.__thtd_hatate_01_lock = false
end
function OnHatate02SpellStart(keys)
if GameRules:IsGamePaused() then return end
local caster = EntIndexToHScript(keys.caster_entindex)
local inners = THTD_FindUnitsInner(caster)
local outers = THTD_FindUnitsOuter(caster)
for k,v in pairs(outers) do
table.insert(inners,v)
end
local deal_damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * keys.tick_time
for k,v in pairs(inners) do
local modifier = v:FindModifierByName("modifier_hatate01_news_buff")
if modifier == nil then
modifier = v:FindModifierByName("modifier_aya01_news_buff")
end
if modifier == nil then
modifier = keys.ability:ApplyDataDrivenModifier(caster,v,"modifier_hatate01_news_buff", nil)
elseif modifier:GetStackCount() < 999 then
modifier:IncrementStackCount()
end
if RandomInt(1,5) == 1 then
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_hatate/ability_hatate_01.vpcf",PATTACH_CUSTOMORIGIN,caster)
ParticleManager:SetParticleControl(effectIndex, 0, v:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
local crit = 1.0
if modifier ~= nil then
crit = crit + modifier:GetStackCount() * caster:GetAbilityValue("thtd_hatate_01", "damage_up", true)
end
local damage_table = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = deal_damage * crit,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = 0
}
UnitDamageTarget(damage_table)
end
end

View File

@@ -0,0 +1,890 @@
local thtd_hecatia_model_list =
{
[1] = "models/new_touhou_model/hecatia/hecatia_earth/hecatia_earth.vmdl",
[2] = "models/new_touhou_model/hecatia/hecatia_moon/hecatia_moon.vmdl",
[3] = "models/new_touhou_model/hecatia/hecatia.vmdl",
}
local HECATIA_TYPE_EARTH = 1
local HECATIA_TYPE_MOON = 2
local HECATIA_TYPE_OTHERWORLD = 3
function OnHecatia01SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
if caster.thtd_hecatia_ball_table == nil then
caster.thtd_hecatia_ball_table = {}
caster.thtd_hecatia_ball_table["earth"] = nil
caster.thtd_hecatia_ball_table["moon"] = nil
caster.thtd_hecatia_ball_table["otherworld"] = nil
end
caster.thtd_hecatia_01_think_count = 0
if caster.thtd_hecatia_ball_table["earth"] == nil then
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_hecatia/ability_hecatia_01_earth.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint + Vector(0,0,128))
ParticleManager:SetParticleControl(effectIndex, 1, Vector(0.4,0,0))
ParticleManager:SetParticleControl(effectIndex, 2, Vector(200,0,0))
caster.thtd_hecatia_ball_table["earth"] =
{
["Vector"] = targetPoint + Vector(0,0,128),
["EffectIndex"] = effectIndex
}
else
caster.thtd_hecatia_ball_table["earth"]["Vector"] = targetPoint + Vector(0,0,128)
end
end
function OnHecatia02SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
if caster.thtd_hecatia_ball_table == nil then
caster.thtd_hecatia_ball_table = {}
caster.thtd_hecatia_ball_table["earth"] = nil
caster.thtd_hecatia_ball_table["moon"] = nil
caster.thtd_hecatia_ball_table["otherworld"] = nil
end
caster.thtd_hecatia_01_think_count = 0
if caster.thtd_hecatia_ball_table["moon"] == nil then
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_hecatia/ability_hecatia_01_moon.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint + Vector(0,0,128))
ParticleManager:SetParticleControl(effectIndex, 1, Vector(0.3,0,0))
ParticleManager:SetParticleControl(effectIndex, 2, Vector(150,0,0))
caster.thtd_hecatia_ball_table["moon"] =
{
["Vector"] = targetPoint + Vector(0,0,128),
["EffectIndex"] = effectIndex
}
else
caster.thtd_hecatia_ball_table["moon"]["Vector"] = targetPoint + Vector(0,0,128)
end
end
function OnHecatia03SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
if caster.thtd_hecatia_ball_table == nil then
caster.thtd_hecatia_ball_table = {}
caster.thtd_hecatia_ball_table["earth"] = nil
caster.thtd_hecatia_ball_table["moon"] = nil
caster.thtd_hecatia_ball_table["otherworld"] = nil
end
caster.thtd_hecatia_01_think_count = 0
if caster.thtd_hecatia_ball_table["otherworld"] == nil then
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_hecatia/ability_hecatia_01_otherworld.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint + Vector(0,0,128))
ParticleManager:SetParticleControl(effectIndex, 1, Vector(0.4,0,0))
ParticleManager:SetParticleControl(effectIndex, 2, Vector(200,0,0))
caster.thtd_hecatia_ball_table["otherworld"] =
{
["Vector"] = targetPoint + Vector(0,0,128),
["CurPoint"] = targetPoint + Vector(0,0,128),
["EffectIndex"] = effectIndex
}
else
local hasCombo = caster:HasModifier("modifier_thtd_hecatia_03_combo_buff")
if not hasCombo then
caster.thtd_hecatia_ball_table["otherworld"]["Vector"] = targetPoint + Vector(0,0,128)
else
caster.thtd_hecatia_ball_table["otherworld"]["Vector"] = targetPoint + Vector(0,0,128)
caster.thtd_hecatia_ball_table["otherworld"]["CurPoint"] = targetPoint + Vector(0,0,128)
caster.thtd_hecatia_ball_midOrigin = targetPoint + Vector(0,0,128)
ParticleManager:SetParticleControl(caster.thtd_hecatia_ball_table["otherworld"]["EffectIndex"], 0, targetPoint + Vector(0,0,128))
end
end
end
function HecatiaRemoveAllBall(caster)
if caster.thtd_hecatia_ball_table == nil then
caster.thtd_hecatia_ball_table = {}
caster.thtd_hecatia_ball_table["earth"] = nil
caster.thtd_hecatia_ball_table["moon"] = nil
caster.thtd_hecatia_ball_table["otherworld"] = nil
end
if caster.thtd_hecatia_ball_table["earth"] ~= nil then
local effectIndex = caster.thtd_hecatia_ball_table["earth"]["EffectIndex"]
ParticleManager:DestroyParticleSystem(effectIndex,true)
end
if caster.thtd_hecatia_ball_table["moon"] ~= nil then
local effectIndex = caster.thtd_hecatia_ball_table["moon"]["EffectIndex"]
ParticleManager:DestroyParticleSystem(effectIndex,true)
end
if caster.thtd_hecatia_ball_table["otherworld"] ~= nil then
local effectIndex = caster.thtd_hecatia_ball_table["otherworld"]["EffectIndex"]
ParticleManager:DestroyParticleSystem(effectIndex,true)
end
if caster.thtd_hecatia_ball_midOrigin ~= nil then
caster.thtd_hecatia_ball_midOrigin = nil
end
if caster.thtd_hecatia_01_think_count ~= nil then
caster.thtd_hecatia_01_think_count = nil
end
caster.thtd_hecatia_ball_table = {}
end
local MIN_RADIUS = 300
function OnHecatia01Think(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if caster.thtd_hecatia_ball_table == nil then
caster.thtd_hecatia_ball_table = {}
caster.thtd_hecatia_ball_table["earth"] = nil
caster.thtd_hecatia_ball_table["moon"] = nil
caster.thtd_hecatia_ball_table["otherworld"] = nil
end
if caster.cast_factor == nil then
caster.cast_factor = 10 -- 卡顿优化每0.3秒释放一次技能原0.03
end
if caster.thtd_hecatia_01_think_count == nil then
caster.thtd_hecatia_01_think_count = 0
end
if caster.thtd_hecatia_01_think_count < 360 then
caster.thtd_hecatia_01_think_count = caster.thtd_hecatia_01_think_count + 1
else
caster.thtd_hecatia_01_think_count = 0
end
if caster.thtd_hecatia_01_think_count_moon == nil then
caster.thtd_hecatia_01_think_count_moon = 0
end
local hasCombo = caster:HasModifier("modifier_thtd_hecatia_03_combo_buff")
if caster.thtd_hecatia_01_think_count_moon < 360 then
if hasCombo then
caster.thtd_hecatia_01_think_count_moon = caster.thtd_hecatia_01_think_count_moon + 2
else
caster.thtd_hecatia_01_think_count_moon = caster.thtd_hecatia_01_think_count_moon + 1
end
else
caster.thtd_hecatia_01_think_count_moon = 0
end
if caster==nil or caster:IsNull()==true or caster:IsAlive()==false or caster:THTD_IsHidden() then
HecatiaRemoveAllBall(caster)
end
if caster:FindAbilityByName("thtd_hecatia_04"):GetLevel() >= 1 and caster.thtd_hecatia_04_lock ~= true then
OnHecatiaTriggerTriangle(caster)
end
if caster.thtd_hecatia_ball_table ~= nil then
if caster.thtd_hecatia_ball_table["earth"] ~= nil then
if caster.thtd_hecatia_ball_table["otherworld"] ~= nil then
if not hasCombo then
local effectIndex = caster.thtd_hecatia_ball_table["earth"]["EffectIndex"]
local distance = math.max(MIN_RADIUS,GetDistanceBetweenTwoVec2D(caster.thtd_hecatia_ball_table["earth"]["Vector"],
caster.thtd_hecatia_ball_table["otherworld"]["Vector"]))
local midOrigin = (caster.thtd_hecatia_ball_table["earth"]["Vector"] + caster.thtd_hecatia_ball_table["otherworld"]["Vector"])/2
local point = midOrigin +
Vector(
math.cos(caster.thtd_hecatia_01_think_count * math.pi/180)*distance,
math.sin(caster.thtd_hecatia_01_think_count * math.pi/180)*distance,
0)
ParticleManager:SetParticleControl(effectIndex, 0, point)
caster.thtd_hecatia_ball_table["earth"]["CurPoint"] = point
if caster.thtd_hecatia_ball_midOrigin ~= midOrigin then
caster.thtd_hecatia_ball_midOrigin = midOrigin
end
else
local effectIndex = caster.thtd_hecatia_ball_table["earth"]["EffectIndex"]
local distance = math.max(MIN_RADIUS * 2, GetDistanceBetweenTwoVec2D(caster.thtd_hecatia_ball_table["earth"]["Vector"],
caster.thtd_hecatia_ball_table["otherworld"]["Vector"]))
local curPoint = caster.thtd_hecatia_ball_table["otherworld"]["Vector"]
if caster.thtd_hecatia_ball_table["otherworld"]["CurPoint"] ~= nil then
curPoint = caster.thtd_hecatia_ball_table["otherworld"]["CurPoint"]
end
local point = curPoint +
Vector(
math.cos(caster.thtd_hecatia_01_think_count * math.pi/90)*distance,
math.sin(caster.thtd_hecatia_01_think_count * math.pi/90)*distance,
0)
ParticleManager:SetParticleControl(effectIndex, 0, point)
caster.thtd_hecatia_ball_table["earth"]["CurPoint"] = point
if caster.thtd_hecatia_ball_midOrigin ~= caster.thtd_hecatia_ball_table["otherworld"]["Vector"] then
caster.thtd_hecatia_ball_midOrigin = caster.thtd_hecatia_ball_table["otherworld"]["Vector"]
end
end
else
local effectIndex = caster.thtd_hecatia_ball_table["earth"]["EffectIndex"]
local distance = math.max(MIN_RADIUS,GetDistanceBetweenTwoVec2D(caster:GetOrigin(), caster.thtd_hecatia_ball_table["earth"]["Vector"]))
local point = caster:GetOrigin() +
Vector(
math.cos(caster.thtd_hecatia_01_think_count * math.pi/180)*distance,
math.sin(caster.thtd_hecatia_01_think_count * math.pi/180)*distance,
128)
ParticleManager:SetParticleControl(effectIndex, 0, point)
caster.thtd_hecatia_ball_table["earth"]["CurPoint"] = point
end
if caster.cast_factor >= 10 then
OnHecatiaEarthHit(caster)
end
end
if caster.thtd_hecatia_ball_table["moon"] ~= nil then
if caster.thtd_hecatia_ball_table["earth"] ~= nil then
local effectIndex = caster.thtd_hecatia_ball_table["moon"]["EffectIndex"]
local distance = math.max(MIN_RADIUS,GetDistanceBetweenTwoVec2D(caster.thtd_hecatia_ball_table["earth"]["Vector"],
caster.thtd_hecatia_ball_table["moon"]["Vector"]))
local curPoint = caster.thtd_hecatia_ball_table["earth"]["Vector"]
if caster.thtd_hecatia_ball_table["earth"]["CurPoint"] ~= nil then
curPoint = caster.thtd_hecatia_ball_table["earth"]["CurPoint"]
end
local point = curPoint +
Vector(
math.cos(caster.thtd_hecatia_01_think_count_moon * math.pi/90)*distance,
math.sin(caster.thtd_hecatia_01_think_count_moon * math.pi/90)*distance,
0)
ParticleManager:SetParticleControl(effectIndex, 0, point)
caster.thtd_hecatia_ball_table["moon"]["CurPoint"] = point
else
local effectIndex = caster.thtd_hecatia_ball_table["moon"]["EffectIndex"]
local distance = math.max(MIN_RADIUS,GetDistanceBetweenTwoVec2D(caster:GetOrigin(), caster.thtd_hecatia_ball_table["moon"]["Vector"]))
local point = caster:GetOrigin() +
Vector(
math.cos(caster.thtd_hecatia_01_think_count * math.pi/90)*distance,
math.sin(caster.thtd_hecatia_01_think_count * math.pi/90)*distance,
128)
ParticleManager:SetParticleControl(effectIndex, 0, point)
caster.thtd_hecatia_ball_table["moon"]["CurPoint"] = point
end
if caster.cast_factor >= 10 then
OnHecatiaMoonHit(caster)
end
end
if caster.thtd_hecatia_ball_table["otherworld"] ~= nil then
if not hasCombo then
if caster.thtd_hecatia_ball_table["earth"] ~= nil then
local effectIndex = caster.thtd_hecatia_ball_table["otherworld"]["EffectIndex"]
local distance = math.max(MIN_RADIUS,GetDistanceBetweenTwoVec2D(caster.thtd_hecatia_ball_table["earth"]["Vector"],
caster.thtd_hecatia_ball_table["otherworld"]["Vector"]))
local midOrigin = (caster.thtd_hecatia_ball_table["earth"]["Vector"] + caster.thtd_hecatia_ball_table["otherworld"]["Vector"])/2
local point = midOrigin +
Vector(
math.cos((caster.thtd_hecatia_01_think_count + 180) * math.pi/180)*distance,
math.sin((caster.thtd_hecatia_01_think_count + 180) * math.pi/180)*distance,
0)
ParticleManager:SetParticleControl(effectIndex, 0, point)
caster.thtd_hecatia_ball_table["otherworld"]["CurPoint"] = point
if caster.thtd_hecatia_ball_midOrigin ~= midOrigin then
caster.thtd_hecatia_ball_midOrigin = midOrigin
end
else
local effectIndex = caster.thtd_hecatia_ball_table["otherworld"]["EffectIndex"]
local distance = math.max(MIN_RADIUS,GetDistanceBetweenTwoVec2D(caster:GetOrigin(), caster.thtd_hecatia_ball_table["otherworld"]["Vector"]))
local point = caster:GetOrigin() +
Vector(
math.cos((caster.thtd_hecatia_01_think_count + 180) * math.pi/180)*distance,
math.sin((caster.thtd_hecatia_01_think_count + 180) * math.pi/180)*distance,
128)
ParticleManager:SetParticleControl(effectIndex, 0, point)
caster.thtd_hecatia_ball_table["otherworld"]["CurPoint"] = point
end
else
if caster.thtd_hecatia_ball_table["earth"] ~= nil then
if caster.thtd_hecatia_ball_midOrigin ~= caster.thtd_hecatia_ball_table["otherworld"]["Vector"] then
caster.thtd_hecatia_ball_midOrigin = caster.thtd_hecatia_ball_table["otherworld"]["Vector"]
end
end
end
if caster.cast_factor >= 10 then
OnHecatiaOtherworldHit(caster)
end
end
end
if caster.cast_factor >= 10 then
caster.cast_factor = 0
RefreshBonus(caster)
else
caster.cast_factor = caster.cast_factor + 1
end
end
function RefreshBonus(caster)
if caster.thtd_hecatia_ball_table["earth"] ~= nil then
caster:THTD_AddPowerPercentage(caster:GetAbilityValue("thtd_hecatia_01", "power_up"), "thtd_hecatia_01_bonus")
else
caster:THTD_AddPowerPercentage("thtd_hecatia_01_bonus")
end
if caster.thtd_hecatia_ball_table["moon"] ~= nil then
caster:THTD_AddCritChance(caster:GetAbilityValue("thtd_hecatia_02", "chance"), "thtd_hecatia_02_bonus")
caster:THTD_AddCritDamage(caster:GetAbilityValue("thtd_hecatia_02", "crit"), "thtd_hecatia_02_bonus")
else
caster:THTD_AddCritChance("thtd_hecatia_02_bonus")
caster:THTD_AddCritDamage("thtd_hecatia_02_bonus")
end
if caster.thtd_hecatia_ball_table["otherworld"] ~= nil then
caster:AddDamageOutgoingAll(caster:GetAbilityValue("thtd_hecatia_03", "damage_up"), "thtd_hecatia_03_bonus")
else
caster:AddDamageOutgoingAll("thtd_hecatia_03_bonus")
end
end
function OnHecatiaEarthHit(caster)
local earthOrigin = caster.thtd_hecatia_ball_table["earth"]["CurPoint"]
local ability = caster:FindAbilityByName("thtd_hecatia_01")
if caster.thtd_hecatia_change_type == HECATIA_TYPE_EARTH then
if caster.thtd_hecatia_triangle_count == nil or caster.thtd_hecatia_triangle_count == 0 then
OnHecatiaCreateTriangle(caster)
end
local damage = caster:THTD_GetAbilityPowerDamage(ability, 1)
local range = ability:GetSpecialValueFor("range1")
local targets = THTD_FindUnitsInRadius(caster,earthOrigin, range)
for k,v in pairs(targets) do
if not v:HasModifier("modifier_hecatia_01_earth_lock") then
ability:ApplyDataDrivenModifier(caster, v, "modifier_hecatia_01_earth_lock", {})
ability:ApplyDataDrivenModifier(caster, v, "modifier_thtd_hecatia_01_debuff", {})
local DamageTable = {
ability = ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE,
}
UnitDamageTarget(DamageTable)
end
end
else
local damage = caster:THTD_GetAbilityPowerDamage(ability, 2)
local range = ability:GetSpecialValueFor("range2")
local targets = THTD_FindUnitsInRadius(caster,earthOrigin, range)
for k,v in pairs(targets) do
local targetOrigin = v:GetOrigin()
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_hecatia/ability_hecatia_earth_rain.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex , 0, targetOrigin)
ParticleManager:DestroyParticleSystemTime(effectIndex,0.5)
local DamageTable = {
ability = ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
end
end
function OnHecatiaMoonHit(caster)
local moonOrigin = caster.thtd_hecatia_ball_table["moon"]["CurPoint"]
local ability = caster:FindAbilityByName("thtd_hecatia_02")
if caster.thtd_hecatia_change_type == HECATIA_TYPE_MOON then
if caster.thtd_hecatia_triangle_count == 1 then
OnHecatiaCreateTriangle(caster)
end
local damage = caster:THTD_GetAbilityPowerDamage(ability, 1)
local range = ability:GetSpecialValueFor("range1")
local backDistance = ability:GetSpecialValueFor("back_distance")
local targets = THTD_FindUnitsInRadius(caster,moonOrigin, range)
for k,v in pairs(targets) do
if not v:HasModifier("modifier_hecatia_01_moon_lock") then
ability:ApplyDataDrivenModifier(caster, v, "modifier_hecatia_01_moon_lock", {})
local forward = (v:GetAbsOrigin()-Vector(moonOrigin.x,moonOrigin.y,0)):Normalized()
v:SetAbsOrigin(v:GetOrigin()+forward*backDistance)
FindClearSpaceForUnit(v, v:GetOrigin(), false)
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_hecatia/ability_hecatia_moon_hit.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex , 0, moonOrigin+Vector(0,0,64))
ParticleManager:DestroyParticleSystem(effectIndex,false)
local DamageTable = {
ability = ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE,
}
UnitDamageTarget(DamageTable)
end
end
else
local damage = caster:THTD_GetAbilityPowerDamage(ability, 2)
local range = ability:GetSpecialValueFor("range2")
local targets = THTD_FindUnitsInRadius(caster,moonOrigin,range)
if #targets > 0 then
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_hecatia/ability_hecatia_moon_reflex.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex , 0, caster:GetOrigin())
ParticleManager:SetParticleControl(effectIndex , 1, moonOrigin+Vector(0,0,64))
ParticleManager:SetParticleControl(effectIndex , 9, caster:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
local targets = THTD_FindUnitsInRadius(caster,moonOrigin,range)
local damage = caster:THTD_GetAbilityPowerDamage(ability, 2)
for k,v in pairs(targets) do
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_hecatia/ability_hecatia_moon_reflex.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex , 0, caster.thtd_hecatia_ball_table["moon"]["CurPoint"]+Vector(0,0,64))
ParticleManager:SetParticleControlEnt(effectIndex , 1, v, 5, "attach_hitloc", Vector(0,0,0), true)
ParticleManager:SetParticleControl(effectIndex , 9, caster.thtd_hecatia_ball_table["moon"]["CurPoint"]+Vector(0,0,64))
ParticleManager:DestroyParticleSystem(effectIndex,false)
local DamageTable = {
ability = ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
end
end
end
function OnHecatiaOtherworldHit(caster)
local otherworldOrigin = caster.thtd_hecatia_ball_table["otherworld"]["CurPoint"]
local ability = caster:FindAbilityByName("thtd_hecatia_03")
if caster.thtd_hecatia_change_type == HECATIA_TYPE_OTHERWORLD then
if caster.thtd_hecatia_triangle_count == 2 then
OnHecatiaCreateTriangle(caster)
end
local damage = caster:THTD_GetAbilityPowerDamage(ability, 1)
local activeRange = ability:GetSpecialValueFor("active_range")
local fullRange = ability:GetSpecialValueFor("full_range")
local suckTime = ability:GetSpecialValueFor("suck_duration")
local targetsFirst = THTD_FindUnitsInRadius(caster,otherworldOrigin, activeRange)
if #targetsFirst > 0 then
if caster.thtd_hecatia_otherworld_think_lock ~= true then
caster.thtd_hecatia_otherworld_think_lock = true
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_hecatia/ability_hecatia_otherworld.vpcf", PATTACH_CUSTOMORIGIN, nil)
local time = suckTime
local clearGroup = {}
THTD_SetSpellLock(caster, "thtd_hecatia_03", suckTime)
caster:SetContextThink(DoUniqueString("ability_hecatia_otherworld_think"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if time <= 0 or caster==nil or caster:IsNull()==true or caster:IsAlive()==false or caster:THTD_IsHidden() then
for k,v in pairs(clearGroup) do
if v~=nil and v:IsNull()==false and v:IsAlive() then
FindClearSpaceForUnit(v, v:GetOrigin(), false)
end
end
clearGroup = {}
caster.thtd_hecatia_otherworld_think_lock = false
ParticleManager:DestroyParticleSystem(effectIndex,true)
return nil
end
local cur_origin = caster.thtd_hecatia_ball_table["otherworld"]["CurPoint"]
local targets = THTD_FindUnitsInRadius(caster,cur_origin, fullRange)
clearGroup = targets
for k,v in pairs(targets) do
local forward = (Vector(cur_origin.x,cur_origin.y,0)-v:GetAbsOrigin()):Normalized()
v:SetAbsOrigin(v:GetOrigin()+forward*100)
UnitStunTarget(caster,v,0.2)
local DamageTable = {
ability = ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
ParticleManager:SetParticleControl(effectIndex , 0, cur_origin)
ParticleManager:SetParticleControl(effectIndex , 2, cur_origin)
time = time - 0.3
return 0.3
end,
0)
end
end
else
local range = ability:GetSpecialValueFor("range2")
local targetsFirst = THTD_FindUnitsInRadius(caster,otherworldOrigin,range)
if #targetsFirst > 0 then
if caster.thtd_hecatia_otherworld_hit_lock ~= true then
caster.thtd_hecatia_otherworld_hit_lock = true
-- caster.thtd_hecatia_otherworld_hit_list = {}
caster:SetContextThink(DoUniqueString("ability_hecatia_hit_delay"),
function()
if GameRules:IsGamePaused() then return 0.03 end
local damage = caster:THTD_GetAbilityPowerDamage(ability, 2)
local targets = THTD_FindUnitsInRadius(caster,otherworldOrigin,range)
for k,v in pairs(targets) do
local DamageTable = {
ability = ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
caster.thtd_hecatia_otherworld_hit_lock = false
return nil
end,
0.5)
local hasCombo = caster:HasModifier("modifier_thtd_hecatia_03_combo_buff")
for i=1,12 do
local forward1 = Vector(math.cos(i*math.pi/6),math.sin(i*math.pi/6),0)
local forward2 = Vector(math.cos(i*math.pi/6+math.pi/2),math.sin(i*math.pi/6+math.pi/2),0)
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_hecatia/ability_hecatia_otherworld_projectile.vpcf", PATTACH_CUSTOMORIGIN, caster)
if hasCombo then
ParticleManager:SetParticleControl(effectIndex, 0, otherworldOrigin + Vector(0,0,128))
else
ParticleManager:SetParticleControl(effectIndex, 0, otherworldOrigin + forward1 * 150 + Vector(0,0,128))
end
ParticleManager:SetParticleControl(effectIndex, 1, forward2 * 800)
ParticleManager:DestroyParticleSystemTime(effectIndex, 0.9)
end
-- for i=1,12 do
-- local forward1 = Vector(math.cos(i*math.pi/6),math.sin(i*math.pi/6),0)
-- local forward2 = Vector(math.cos(i*math.pi/6+math.pi/2),math.sin(i*math.pi/6+math.pi/2),0)
-- local info =
-- {
-- Ability = ability,
-- EffectName = "particles/heroes/thtd_hecatia/ability_hecatia_otherworld_projectile.vpcf",
-- vSpawnOrigin = otherworldOrigin + forward1 * 100 + Vector(0,0,128),
-- fDistance = range,
-- fStartRadius = 150,
-- fEndRadius = 150,
-- Source = caster,
-- bHasFrontalCone = false,
-- bReplaceExisting = false,
-- iUnitTargetTeam = DOTA_UNIT_TARGET_TEAM_ENEMY,
-- iUnitTargetFlags = DOTA_UNIT_TARGET_FLAG_NONE,
-- iUnitTargetType = DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC,
-- fExpireTime = GameRules:GetGameTime() + 10.0,
-- bDeleteOnHit = false,
-- vVelocity = forward2 * 500,
-- bProvidesVision = true,
-- iVisionRadius = 1000,
-- iVisionTeamNumber = caster:GetTeamNumber()
-- }
-- local projectile = ProjectileManager:CreateLinearProjectile(info)
-- ParticleManager:DestroyLinearProjectileSystem(projectile,false)
-- end
end
end
end
end
-- function OnHecatiaProjectileHit(keys)
-- local caster = EntIndexToHScript(keys.caster_entindex)
-- local target = keys.target
-- for k,v in pairs(caster.thtd_hecatia_otherworld_hit_list) do
-- if v == target then
-- return
-- end
-- end
-- local damage = caster:THTD_GetAbilityPowerDamage(caster:FindAbilityByName("thtd_hecatia_03"), 2)
-- local DamageTable = {
-- ability = keys.ability,
-- victim = target,
-- attacker = caster,
-- damage = damage,
-- damage_type = keys.ability:GetAbilityDamageType(),
-- damage_flags = DOTA_DAMAGE_FLAG_NONE,
-- }
-- UnitDamageTarget(DamageTable)
-- table.insert(caster.thtd_hecatia_otherworld_hit_list, target)
-- end
function OnHecatia04Think(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if caster:GetTowerPowerLevel() >= 3 then
if caster.thtd_hecatia_change_list == nil or #caster.thtd_hecatia_change_list == 0 then
caster.thtd_hecatia_change_list = {HECATIA_TYPE_EARTH, HECATIA_TYPE_MOON, HECATIA_TYPE_OTHERWORLD, HECATIA_TYPE_EARTH, HECATIA_TYPE_MOON, HECATIA_TYPE_OTHERWORLD}
end
local index = RandomInt(1,#caster.thtd_hecatia_change_list)
local randomType = caster.thtd_hecatia_change_list[index]
table.remove(caster.thtd_hecatia_change_list, index)
caster:SetModel(thtd_hecatia_model_list[randomType])
caster:SetOriginalModel(thtd_hecatia_model_list[randomType])
caster.thtd_hecatia_change_type = randomType
return
end
local randomType = RandomInt(1,3)
caster:SetModel(thtd_hecatia_model_list[randomType])
caster:SetOriginalModel(thtd_hecatia_model_list[randomType])
caster.thtd_hecatia_change_type = randomType
-- local level = 1
-- if GetHecatiaBallCount(caster) == 3 then
-- level = 2
-- end
-- for i=1,4 do
-- local ability = caster:FindAbilityByName("thtd_hecatia_0"..tostring(i))
-- if ability ~= nil and ability:GetLevel() ~= level then
-- ability:SetLevel(level)
-- end
-- end
end
function OnHecatiaCreateTriangle(caster)
if caster.thtd_hecatia_ball_midOrigin == nil then
return
end
if caster.thtd_hecatia_triangle_count == nil then
caster.thtd_hecatia_triangle_count = 0
end
if caster.thtd_hecatia_triangle_table == nil then
caster.thtd_hecatia_triangle_table = {}
end
if caster.thtd_hecatia_triangle_angle == nil then
caster.thtd_hecatia_triangle_angle = RandomInt(0, 360)
end
if caster.thtd_hecatia_triangle_count < 3 then
local radius = 900
local point = RotatePosition(caster.thtd_hecatia_ball_midOrigin, QAngle(0,caster.thtd_hecatia_triangle_angle,0), caster.thtd_hecatia_ball_midOrigin + Vector(0, radius, 0))
caster.thtd_hecatia_triangle_count = caster.thtd_hecatia_triangle_count + 1
if caster.thtd_hecatia_triangle_count == 2 then
point = RotatePosition(caster.thtd_hecatia_ball_midOrigin, QAngle(0,120,0), point)
elseif caster.thtd_hecatia_triangle_count == 3 then
point = RotatePosition(caster.thtd_hecatia_ball_midOrigin, QAngle(0,240,0), point)
end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_hecatia/ability_hecatia_04_triangle.vpcf", PATTACH_CUSTOMORIGIN, nil)
ParticleManager:SetParticleControl(effectIndex , 0, point)
ParticleManager:SetParticleControl(effectIndex , 3, point)
caster.thtd_hecatia_triangle_table[caster.thtd_hecatia_triangle_count] = {}
caster.thtd_hecatia_triangle_table[caster.thtd_hecatia_triangle_count]["EffectIndex"] = effectIndex
caster.thtd_hecatia_triangle_table[caster.thtd_hecatia_triangle_count]["Origin"] = point
end
end
function OnHecatiaTriggerTriangle(caster)
if caster.thtd_hecatia_triangle_count == nil then
caster.thtd_hecatia_triangle_count = 0
end
if caster.thtd_hecatia_triangle_table == nil then
caster.thtd_hecatia_triangle_table = {}
end
if caster.thtd_hecatia_triangle_count >= 3 and THTD_HasUnitsInRadius(caster, caster:GetAbsOrigin(), 1500) then
local ability = caster:FindAbilityByName("thtd_hecatia_04")
local duration = math.floor(ability:GetSpecialValueFor("duration_time") * 100 + 0.5)/100
local power_bonus = ability:GetSpecialValueFor("power_bonus")
local durationDelay = 0
local delayCount = 0
local time = 0
local count = 0
local triangleTable = caster.thtd_hecatia_triangle_table
caster.thtd_hecatia_04_lock = true
caster:SetContextThink(DoUniqueString("ability_hecatia_triangle_think"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if time > duration + durationDelay or THTD_IsValid(caster) == false then
ParticleManager:DestroyParticleSystem(caster.thtd_hecatia_triangle_table[1]["EffectIndex"],true)
ParticleManager:DestroyParticleSystem(caster.thtd_hecatia_triangle_table[2]["EffectIndex"],true)
ParticleManager:DestroyParticleSystem(caster.thtd_hecatia_triangle_table[3]["EffectIndex"],true)
triangleTable = {}
caster.thtd_hecatia_triangle_table = {}
caster.thtd_hecatia_triangle_count = 0
caster.thtd_hecatia_triangle_angle = nil
caster.thtd_hecatia_04_lock = false
return nil
end
-- 改为三角连接和中心发射同时进行
count = count + 1
if count > 3 then
count = 1
end
local countNext = count + 1
if countNext > 3 then
countNext = 1
end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_hecatia/ability_hecatia_04_laser.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex , 0, triangleTable[count]["Origin"])
ParticleManager:SetParticleControl(effectIndex , 1, triangleTable[countNext]["Origin"])
ParticleManager:SetParticleControl(effectIndex , 9, triangleTable[count]["Origin"])
ParticleManager:DestroyParticleSystem(effectIndex,false)
local distance = GetDistanceBetweenTwoVec2D(triangleTable[count]["Origin"], triangleTable[countNext]["Origin"])
local speed = 3000
local delayTime = distance / speed
time = time + delayTime
if delayCount < 3 then
delayCount = delayCount + 1
durationDelay = delayTime
if delayCount == 3 then
caster:THTD_AddBasePower(power_bonus, "thtd_hecatia_04_buff")
caster:SetContextThink(DoUniqueString("dota_timer"),
function()
if GameRules:IsGamePaused() then return 0.1 end
if time > duration + durationDelay or THTD_IsValid(caster) == false then
caster:THTD_AddBasePower("thtd_hecatia_04_buff")
return nil
end
caster:SetContextThink(DoUniqueString("dota_timer"),
function()
local center,radius = GetCircleCenterAndRadius(triangleTable[1]["Origin"],triangleTable[2]["Origin"],triangleTable[3]["Origin"])
local targets = THTD_FindUnitsInRadius(caster,center,radius)
local damage = caster:THTD_GetAbilityPowerDamage(ability)
for k,v in pairs(targets) do
if v ~= nil and v:IsNull() == false and v:IsAlive() and IsInTriangle(triangleTable[1]["Origin"],triangleTable[2]["Origin"],triangleTable[3]["Origin"],v:GetAbsOrigin()) then
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_hecatia/ability_hecatia_04_laser.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex , 0, center)
ParticleManager:SetParticleControlEnt(effectIndex , 1, v, 5, "attach_hitloc", Vector(0,0,0), true)
ParticleManager:SetParticleControl(effectIndex , 9, center)
ParticleManager:DestroyParticleSystem(effectIndex,false)
local DamageTable = {
ability = ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
end
return nil
end,
0.3)
return 0.5
end,
0)
end
end
return delayTime
-- 这个效果是三个三角依次连接后再从中心发射
-- if count < 3 then
-- count = count + 1
-- local countNext = count + 1
-- if countNext > 3 then
-- countNext = 1
-- end
-- local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_hecatia/ability_hecatia_04_laser.vpcf", PATTACH_CUSTOMORIGIN, caster)
-- ParticleManager:SetParticleControl(effectIndex , 0, triangleTable[count]["Origin"])
-- ParticleManager:SetParticleControl(effectIndex , 1, triangleTable[countNext]["Origin"])
-- ParticleManager:SetParticleControl(effectIndex , 9, triangleTable[count]["Origin"])
-- ParticleManager:DestroyParticleSystem(effectIndex,false)
-- local distance = GetDistanceBetweenTwoVec2D(triangleTable[count]["Origin"], triangleTable[countNext]["Origin"])
-- local speed = 3000
-- local delayTime = distance / speed
-- time = time - delayTime
-- return delayTime
-- else
-- local center,radius = GetCircleCenterAndRadius(triangleTable[1]["Origin"],triangleTable[2]["Origin"],triangleTable[3]["Origin"])
-- local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_hecatia/ability_hecatia_04_laser.vpcf", PATTACH_CUSTOMORIGIN, caster)
-- ParticleManager:SetParticleControl(effectIndex , 0, triangleTable[1]["Origin"])
-- ParticleManager:SetParticleControl(effectIndex , 1, caster.thtd_hecatia_ball_midOrigin)
-- ParticleManager:SetParticleControl(effectIndex , 9, triangleTable[1]["Origin"])
-- ParticleManager:DestroyParticleSystem(effectIndex,false)
-- local distance = GetDistanceBetweenTwoVec2D(triangleTable[1]["Origin"], caster.thtd_hecatia_ball_midOrigin)
-- local speed = 3000
-- local delayTime = distance / speed
-- caster:SetContextThink(DoUniqueString("ability_hecatia_04_delay"),
-- function()
-- if GameRules:IsGamePaused() then return 0.03 end
-- local damage = caster:THTD_GetAbilityPowerDamage(ability)
-- local targets = THTD_FindUnitsInRadius(caster,center,radius)
-- for k,v in pairs(targets) do
-- local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_hecatia/ability_hecatia_04_laser.vpcf", PATTACH_CUSTOMORIGIN, caster)
-- ParticleManager:SetParticleControl(effectIndex , 0, caster.thtd_hecatia_ball_midOrigin)
-- ParticleManager:SetParticleControlEnt(effectIndex , 1, v, 5, "attach_hitloc", Vector(0,0,0), true)
-- ParticleManager:SetParticleControl(effectIndex , 9, caster.thtd_hecatia_ball_midOrigin)
-- ParticleManager:DestroyParticleSystem(effectIndex,false)
-- local DamageTable = {
-- ability = ability,
-- victim = v,
-- attacker = caster,
-- damage = damage,
-- damage_type = ability:GetAbilityDamageType(),
-- damage_flags = DOTA_DAMAGE_FLAG_NONE
-- }
-- UnitDamageTarget(DamageTable)
-- end
-- return nil
-- end,
-- delayTime)
-- count = 0
-- time = time - tick
-- return tick
-- end
end,
0)
end
end
function GetHecatiaBallCount(caster)
if caster.thtd_hecatia_ball_table == nil then return 0 end
local count = 0
if caster.thtd_hecatia_ball_table["earth"] ~= nil then
count = count + 1
end
if caster.thtd_hecatia_ball_table["moon"] ~= nil then
count = count + 1
end
if caster.thtd_hecatia_ball_table["otherworld"] ~= nil then
count = count + 1
end
return count
end

View File

@@ -0,0 +1,143 @@
-- 特殊太卡,弃用
function OnHina02Think(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if keys.ability:GetLevel() < 1 then return end
-- caster:EmitSound("Hero_TrollWarlord.WhirlingAxes.Melee")
local effect = "particles/econ/items/troll_warlord/troll_ti10_shoulder/troll_ti10_whirling_axe_melee.vpcf"
local damage = 1000
local damage_tick = 0.1
local damage_duration = 3.0
local max_count = math.floor(damage_duration/damage_tick + 0.5)
local radius = 1000 - 200
local elapsed_duration = 0
local enemies_hit = {}
local caster_pos = caster:GetAbsOrigin()
local caster_direction = caster:GetForwardVector()
local effectIndexList = {}
local effectPointList = {}
for i = 1,5 do
local axe_target_point = RotatePosition(caster_pos, QAngle(0, i * 72, 0), caster_pos + caster_direction * 175)
local effectIndex = ParticleManager:CreateParticle(effect, PATTACH_ABSORIGIN_FOLLOW, caster)
ParticleManager:SetParticleControl(effectIndex, 0, caster_pos + Vector(0, 0, 100))
ParticleManager:SetParticleControl(effectIndex, 1, axe_target_point + Vector(0, 0, 100))
ParticleManager:SetParticleControl(effectIndex, 4, Vector(damage_duration, 0, 0))
effectIndexList[i] = effectIndex
effectPointList[i] = axe_target_point
end
local count = 1
caster:SetContextThink(DoUniqueString("dota_timer"),
function()
if GameRules:IsGamePaused() then return 0.1 end
for i = 1,5 do
local axe_target_point = RotatePosition(caster_pos, QAngle(0, 360 * count/max_count, 0), effectPointList[i])
axe_target_point = axe_target_point + (axe_target_point - caster_pos):Normalized() * radius * count/max_count
ParticleManager:SetParticleControl(effectIndexList[i], 1, axe_target_point + Vector(0, 0, 100))
end
local targets = THTD_FindUnitsInRadius(caster,caster_pos,1200)
local damage = 1200
for k,v in pairs(targets) do
if v~=nil and v:IsNull()==false and v:IsAlive() then
if enemies_hit[v:entindex()] ~= true then
enemies_hit[v:entindex()] = true
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
end
end
-- If the duration is over, end
if count < max_count then
count = count + 1
return damage_tick
else
for i = 1,5 do
ParticleManager:ReleaseParticleIndex(effectIndexList[i])
end
return nil
end
end,
0.1)
end
function OnSpellStartHina02(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
local range = keys.range
local bonus_crit = keys.bonus_crit
local chance = keys.chance
local duration = math.floor(keys.duration * 100 + 0.5)/100
local tick = math.floor(keys.tick * 100 + 0.5)/100
local effect = "particles/econ/items/troll_warlord/troll_ti10_shoulder/troll_ti10_whirling_axe_melee.vpcf"
local effectIndex = ParticleManager:CreateParticle(effect, PATTACH_ABSORIGIN_FOLLOW, caster)
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetAbsOrigin() + Vector(0, 0, 100))
ParticleManager:SetParticleControl(effectIndex, 1, targetPoint + Vector(0, 0, 100))
ParticleManager:SetParticleControl(effectIndex, 4, Vector(duration + 4, 0, 0))
local powerChance = 0
local pv = caster:GetAbilityPowerValue("thtd_hina_02")
if pv ~= nil then
powerChance = pv[1]
end
local crit666 = 1
if caster:IsPower666() then crit666 = 5 end
local time = duration
caster:SetContextThink(DoUniqueString("dota_timer"),
function()
if GameRules:IsGamePaused() then return 0.1 end
time = time - tick
if time < 0 then
ParticleManager:DestroyParticleSystem(effectIndex,true)
return nil
end
local targets = THTD_FindUnitsInRadius(caster,targetPoint,range)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
for k,v in pairs(targets) do
local crit = 1
v.thtd_hina_02_debuff_count = math.min(999, (v.thtd_hina_02_debuff_count or 0) + 1)
local count = v.thtd_hina_02_debuff_count
if caster:IsPower999() then
for _,tar in pairs(targets) do
if v ~= tar then
count = count + (tar.thtd_hina_02_debuff_count or 0) * 0.4
end
end
end
if RollPercentage(chance + powerChance) then
crit = 1 + count * (bonus_crit + powerChance)/100
end
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage * crit * crit666,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
return tick
end,
tick)
end

View File

@@ -0,0 +1,21 @@
function OnHourainingyou01AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if RollPercentage(keys.chance) then
local DamageTable = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = caster:THTD_GetAbilityPowerDamage(keys.ability),
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
if not target:HasModifier("modifier_hourainingyou_01_stun_lock") then
keys.ability:ApplyDataDrivenModifier(caster, target, "modifier_hourainingyou_01_stun_lock", {Duration = keys.lock_time})
UnitStunTarget(caster,target,keys.stun_time)
end
end
end

View File

@@ -0,0 +1,95 @@
function OnIku01AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local targetPoint = target:GetOrigin()
if caster.thtd_iku_01_attack_count == nil then
caster.thtd_iku_01_attack_count = 0
end
caster.thtd_iku_01_attack_count = caster.thtd_iku_01_attack_count + 1
if caster.thtd_iku_01_attack_count >= keys.max_count then
caster.thtd_iku_01_attack_count = 0
caster:EmitSound("Sound_THTD.thtd_iku_01")
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.radius)
for k,v in pairs(targets) do
if v:HasModifier("modifier_iku_01_debuff_lock") == false then
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_iku_01_debuff", {Duration = keys.stun_time})
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_iku_01_debuff_lock", nil)
end
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/iku/ability_iku_01_explosion.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
end
function OnIku02SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
local time = keys.duration_time
local tick = keys.tick_time
Iku02CreateEffect(keys)
caster:EmitSound("Sound_THTD.thtd_iku_02")
caster:SetContextThink(DoUniqueString("thtd_iku02_lightning"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if time <= 0 then return nil end
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.radius)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * tick
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
time = time - tick
return tick
end,
0)
end
function Iku02CreateEffect(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
local vec = caster:GetOrigin() + 700*caster:GetForwardVector() + Vector(0,0,128)
local particle = ParticleManager:CreateParticle("particles/thd2/heroes/iku/ability_iku_04_light_b.vpcf",PATTACH_CUSTOMORIGIN,caster)
ParticleManager:SetParticleControl(particle,0,vec)
ParticleManager:SetParticleControlForward(particle,0,caster:GetForwardVector())
ParticleManager:SetParticleControl(particle,2,vec)
ParticleManager:SetParticleControl(particle,3,vec)
ParticleManager:SetParticleControl(particle,4,-caster:GetForwardVector())
ParticleManager:SetParticleControl(particle,5,-caster:GetForwardVector())
ParticleManager:DestroyParticleSystemTime(particle,keys.duration_time)
particle = ParticleManager:CreateParticle("particles/thd2/heroes/iku/ability_iku_04_model.vpcf",PATTACH_CUSTOMORIGIN,caster)
ParticleManager:SetParticleControl(particle,0,caster:GetOrigin()+caster:GetForwardVector()*350 + Vector(0,0,128))
ParticleManager:SetParticleControlForward(particle,0,caster:GetForwardVector())
ParticleManager:DestroyParticleSystemTime(particle,keys.duration_time)
end

View File

@@ -0,0 +1,204 @@
local inaba_01_black_list =
{
"lily",
"daiyousei",
}
function IsInInaba01BlackList(unit)
for k,v in pairs(inaba_01_black_list) do
if unit:GetUnitName() == v then
return true
end
end
return false
end
function OnSpellStartInaba01(keys)
local caster = keys.caster
local target = keys.target
if target:THTD_IsTower() == false or target:GetPlayerOwnerID() ~= caster:GetPlayerOwnerID() then
keys.ability:EndCooldown()
caster:GiveMana(caster:GetRealManaCost(keys.ability))
return
end
caster.thtd_last_cast_unit = target
caster:EmitSound("Hero_OgreMagi.Bloodlust.Cast")
local modifier = target:FindModifierByName("modifier_inaba_01_buff")
if modifier == nil then
modifier = keys.ability:ApplyDataDrivenModifier(caster, target, "modifier_inaba_01_buff", nil)
else
modifier:SetDuration(keys.duration, false)
end
local effectName = "particles/econ/items/ogre_magi/ogre_ti8_immortal_weapon/ogre_ti8_immortal_bloodlust_buff.vpcf"
local effectIndex = ParticleManager:CreateParticle(effectName, PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControlEnt(effectIndex, 0, caster, PATTACH_POINT_FOLLOW, "attach_hitloc", caster:GetAbsOrigin(), true)
ParticleManager:SetParticleControlEnt(effectIndex, 2, target, PATTACH_CUSTOMORIGIN_FOLLOW, nil, target:GetAbsOrigin(), true)
ParticleManager:SetParticleControlEnt(effectIndex, 3, target, PATTACH_CUSTOMORIGIN_FOLLOW, nil, target:GetAbsOrigin(), true)
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
function OnCreatedInaba01Buff(keys)
local target = keys.target
target:THTD_AddCritChance(keys.chance, "thtd_inaba_01_buff_bonus")
target:THTD_AddAttackSpeed(keys.attack_speed, "thtd_inaba_01_buff_bonus")
if not IsInInaba01BlackList(target) then
target:AddManaCostReducePercent(keys.mana_cost, "thtd_inaba_01_buff_bonus")
end
end
function OnDestroyInaba01Buff(keys)
local target = keys.target
target:THTD_AddCritChance("thtd_inaba_01_buff_bonus")
target:THTD_AddAttackSpeed("thtd_inaba_01_buff_bonus")
if not IsInInaba01BlackList(target) then
target:AddManaCostReducePercent("thtd_inaba_01_buff_bonus")
end
end
function OnAttackLandedInaba02(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local targetPoint = keys.target:GetAbsOrigin()
caster.thtd_inaba_02_attack_count = (caster.thtd_inaba_02_attack_count or 0) + 1
local powerDamageUp = 0
local pv = caster:GetAbilityPowerValue("thtd_inaba_02")
if pv ~= nil then
powerDamageUp = pv[1]
end
local damage_up = keys.damage_up + powerDamageUp
local max_count = keys.max_count
if caster:IsPower999() then
max_count = max_count * 2
end
if caster:HasModifier("modifier_inaba_02_buff") then
caster:FindModifierByName("modifier_inaba_02_buff"):SetDuration(2.0, false)
end
if caster.thtd_inaba_02_attack_count % keys.count1 == 0 then
if caster.thtd_inaba_power666_bonus_power ~= nil then
caster:THTD_AddPowerPercentage(-caster.thtd_inaba_power666_bonus_power)
caster.thtd_inaba_power666_bonus_power = nil
end
if caster:IsPower999() then
caster.thtd_inaba_power666_bonus_power = 300
caster:THTD_AddPowerPercentage(caster.thtd_inaba_power666_bonus_power)
end
local unit = CreateUnitByName(
"inaba_rabbit"
,caster:GetOrigin() + caster:GetForwardVector() * 120
,false
,caster:GetOwner()
,caster:GetOwner()
,caster:GetTeam()
)
local lastVec = target:GetAbsOrigin()
if unit ~= nil then
unit:SetControllableByPlayer(caster:GetPlayerOwnerID(), false)
unit.thtd_spawn_unit_owner = caster
keys.ability:ApplyDataDrivenModifier(caster, unit, "modifier_inaba_02_rabbit", nil)
unit:AddNewModifier(unit, nil, "modifier_phased", {})
local kill_time = 10.0
unit:SetContextThink(DoUniqueString("dota_timer"),
function()
if GameRules:IsGamePaused() then return 0.1 end
kill_time = kill_time - 0.2
if THTD_IsValid(caster) == false or kill_time < 0 then
unit:AddNoDraw()
unit:ForceKill(false)
return nil
end
unit:MoveToPosition(lastVec)
if THTD_IsValid(target) then
lastVec = target:GetAbsOrigin()
end
if (lastVec - unit:GetAbsOrigin()):Length2D() < 100 then
-- EmitSoundOnLocationWithCaster(lastVec, "Hero_Techies.LandMine.Detonate", caster)
local effectIndex = ParticleManager:CreateParticle("particles/units/heroes/hero_techies/techies_blast_off.vpcf", PATTACH_POINT, caster)
ParticleManager:SetParticleControl(effectIndex , 0, lastVec)
ParticleManager:DestroyParticleSystem(effectIndex, false)
unit:AddNoDraw()
unit:ForceKill(false)
local boomTargets = THTD_FindUnitsInRadius(caster,lastVec,keys.range)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability, 1)
local modifier = caster:FindModifierByName("modifier_inaba_02_buff")
if modifier ~= nil then
local stack_count = modifier:GetStackCount()
damage = damage * (1 + stack_count * damage_up/100)
modifier:SetStackCount(math.min(max_count, stack_count+1))
else
keys.ability:ApplyDataDrivenModifier(caster, caster, "modifier_inaba_02_buff", {duration = 2.0}):SetStackCount(1)
end
for k,v in pairs(boomTargets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
return nil
end
return 0.2
end,
0.2)
end
end
if caster.thtd_inaba_02_attack_count >= keys.count2 then
caster.thtd_inaba_02_attack_count = 0
local effectName = "particles/econ/items/sniper/sniper_fall20_immortal/sniper_fall20_immortal_shrapnel.vpcf"
local effectIndex = ParticleManager:CreateParticle(effectName, PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, target:GetAbsOrigin())
ParticleManager:SetParticleControl(effectIndex, 1, Vector(keys.range, 0, 0))
local time = math.floor(keys.duration * 100 + 0.5)/100
local tick = 0.5
caster:SetContextThink(DoUniqueString("dota_timer"),
function()
if GameRules:IsGamePaused() then return 0.1 end
time = time - tick
if time < 0 or THTD_IsValid(caster) == false then
ParticleManager:DestroyParticleSystem(effectIndex,true)
return nil
end
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.range)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability, 2)
local modifier = caster:FindModifierByName("modifier_inaba_02_buff")
if modifier ~= nil then
damage = damage * (1 + modifier:GetStackCount() * damage_up/100)
end
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
return tick
end,
0.1)
end
end

View File

@@ -0,0 +1,486 @@
function OnItem2001_SpellStart(keys)
local caster = keys.caster
if caster:IsRealHero() or caster:GetUnitName() == "reimu_pet" then
local entities = Entities:FindAllByClassname("npc_dota_creature")
for k,v in pairs(entities) do
local findNum = string.find(v:GetUnitName(), 'creature')
if findNum ~= nil and v~=nil and v:IsNull()==false and v:IsAlive() then
if SpawnSystem.IsUnLimited then
if v.thtd_player_index == caster:GetPlayerOwnerID() then
caster:NpcKill(v)
end
else
caster:NpcKill(v)
end
end
end
if SpawnSystem.CurWave > 100 then
if caster:GetUnitName() == "reimu_pet" then
caster:GetOwner().use_item2001_count = (caster:GetOwner().use_item2001_count or 0) + 1
else
caster.use_item2001_count = (caster.use_item2001_count or 0) + 1
end
if SpawnSystem.RankMinWave >= SpawnSystem.CurWave then
SpawnSystem.RankMinWave = SpawnSystem.RankMinWave + 1
end
end
local particle = ParticleManager:CreateParticle("particles/heroes/yumemi/ability_yumemi_04_exolosion.vpcf",PATTACH_CUSTOMORIGIN,caster)
ParticleManager:SetParticleControl(particle,0,caster:GetOrigin())
ParticleManager:DestroyParticleSystem(particle,false)
if keys.ability:IsItem() then
local charge = keys.ability:GetCurrentCharges()
if charge > 1 then
keys.ability:SetCurrentCharges(charge-1)
else
caster:RemoveItem(keys.ability)
end
end
end
end
function OnItem2002_SpellStart(keys)
local caster = keys.caster
if caster:IsRealHero() then
if keys.ability:IsItem() then
local select_cards = {}
for k,v in pairs(towerPlayerList[caster:GetPlayerOwnerID()+1]) do
if v["quality"] == 4 and string.find(v["itemName"],"item_20") == nil and v["count"] > 0 then
select_cards[v["itemName"]] = v["itemName"]
end
end
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_select_card_panel", {cards=select_cards} )
caster.thtd_last_select_item = keys.ability
end
end
end
function OnItem2003_SpellStart(keys)
local caster = keys.caster
if caster:IsRealHero() then
if keys.ability:IsItem() then
local select_cards = {}
for k,v in pairs(towerPlayerList[caster:GetPlayerOwnerID()+1]) do
if v["quality"] == 3 and string.find(v["itemName"],"item_20") == nil and v["count"] > 0 then
select_cards[v["itemName"]] = v["itemName"]
end
end
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_select_card_panel", {cards=select_cards} )
caster.thtd_last_select_item = keys.ability
end
end
end
function OnItem2004_SpellStart(keys)
local caster = keys.caster
if caster:IsRealHero() then
if keys.ability:IsItem() then
local select_cards = {}
for k,v in pairs(towerPlayerList[caster:GetPlayerOwnerID()+1]) do
if v["quality"] == 2 and string.find(v["itemName"],"item_20") == nil and v["count"] > 0 then
select_cards[v["itemName"]] = v["itemName"]
end
end
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_select_card_panel", {cards=select_cards} )
caster.thtd_last_select_item = keys.ability
end
end
end
function OnItem2021_SpellStart(keys)
local target = keys.target
if target:THTD_IsTower() and target:HasModifier("modifier_item_2021_buff") == false then
local duration_time = math.max(keys.duration_min, keys.duration_max - keys.step * (target.item2021_count or 0)) * 1.0
target.item2021_count = (target.item2021_count or 0) + 1
keys.ability:ApplyDataDrivenModifier(target, target, "modifier_item_2021_buff", {duration = duration_time})
if keys.ability:IsItem() then
local charge = keys.ability:GetCurrentCharges()
if charge > 1 then
keys.ability:SetCurrentCharges(charge-1)
else
keys.caster:RemoveItem(keys.ability)
end
end
else
keys.ability:EndCooldown()
end
end
function OnCreatedItem2021Buff(keys)
local target = keys.target
local bonus = keys.bonus
target:THTD_AddManaRegenPercentage(bonus, "thtd_item_2021_bonus")
target:THTD_AddAttackSpeed(bonus, "thtd_item_2021_bonus")
target:THTD_AddCritChance(bonus, "thtd_item_2021_bonus")
target:THTD_AddCritDamage(bonus, "thtd_item_2021_bonus")
target:THTD_AddPowerPercentage(bonus, "thtd_item_2021_bonus")
target:THTD_AddAttackPercentage(bonus, "thtd_item_2021_bonus")
target:SetModelScale(target:GetModelScale() * 1.25)
end
function OnRemoveItem2021Buff(keys)
local target = keys.target
target:THTD_AddManaRegenPercentage("thtd_item_2021_bonus")
target:THTD_AddAttackSpeed("thtd_item_2021_bonus")
target:THTD_AddCritChance("thtd_item_2021_bonus")
target:THTD_AddCritDamage("thtd_item_2021_bonus")
target:THTD_AddPowerPercentage("thtd_item_2021_bonus")
target:THTD_AddAttackPercentage("thtd_item_2021_bonus")
target:SetModelScale(target:GetModelScale() / 1.25)
end
function OnItem2022_SpellStart(keys)
if SpawnSystem.IsUnLimited then return end
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if caster:IsRealHero() then
if target:THTD_IsTower() and target:THTD_GetLevel()<THTD_MAX_LEVEL then
target:THTD_SetLevel(THTD_MAX_LEVEL)
else
keys.ability:EndCooldown()
end
end
end
function OnItem3146_SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if caster:IsRealHero() == false then
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner(), "display_custom_error", {msg="only_hero_use"})
return
end
if (caster.item_power_used or 0) >= 4 then
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner(), "display_custom_error", {msg="reach_to_limit"})
return
end
if target:THTD_IsTower() then
local maxLevel = target:GetMaxPowerLevel()
local modifier = target:FindModifierByName("modifier_fairy_count")
if modifier == nil then
target:AddNewModifier(target, nil, "modifier_fairy_count", nil):SetStackCount(math.min(maxLevel,keys.point))
target.thtd_power_from_item = (target.thtd_power_from_item or 0) + math.min(maxLevel,keys.point)
else
local count = modifier:GetStackCount()
if count >= maxLevel then
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner(), "display_custom_error", {msg="reach_to_limit"})
return
end
target.thtd_power_from_item = (target.thtd_power_from_item or 0) + math.min(maxLevel - count, keys.point)
count = math.min(maxLevel, count + keys.point)
modifier:SetStackCount(count)
if target.thtd_power_level ~= nil then
target.thtd_power_level = count
target:AddPowerBonus()
end
end
target:EmitSound("Quest.Completed")
caster.item_power_used = (caster.item_power_used or 0) + 1
if GameRules.GameData.luck_card ~= "all" then
Service:SavePowerMaxCount(keys.ability.owner_player_id, false)
end
keys.ability:RemoveSelf()
end
end
function OnItem3150_SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if not caster:THTD_IsTower() then return end
local radius = 900
local duration = 10
if keys.ability.spell_effect ~= nil then
ParticleManager:DestroyParticle(keys.ability.spell_effect, true)
end
local effectIndex = ParticleManager:CreateParticle("particles/units/heroes/hero_riki/riki_tricks.vpcf", PATTACH_ABSORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 1, Vector(radius,radius,radius))
ParticleManager:SetParticleControl(effectIndex, 2, Vector(duration,0,0))
keys.ability.spell_effect = effectIndex
local damage = caster:THTD_GetStarDamage() * keys.power_damage
local attackDamage = caster:THTD_GetAttack()
local targets = THTD_FindUnitsInRadius(caster, caster:GetAbsOrigin(), radius)
local count = 0
for k,v in pairs(targets) do
count = count + 1
if count <= 3 then
-- 多了造成卡顿,改为取消普通攻击动画实现
--倒数第二个参数bFakeAttack如果为true则不会造成伤害
--第三个参数如果为false则会触发OnAttack事件但是不会触发其余的几个事件start、land、finish这样有些攻击命中才生效的逻辑就不会触发了
--PerformAttack(handle hTarget, bool bUseCastAttackOrb, bool bProcessProcs, bool bSkipCooldown, bool bIgnoreInvis, bool bUseProjectile, bool bFakeAttack, bool bNeverMiss)
caster:PerformAttack(v,true,true,true,false,false,false,true)
end
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = DAMAGE_TYPE_PHYSICAL,
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
if count > 3 then
DamageTable.damage = DamageTable.damage + attackDamage
end
UnitDamageTarget(DamageTable)
end
end
function OnItem3151_SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if keys.ability:IsCooldownReady() then
keys.ability:StartCooldown(keys.ability:GetCooldown(0))
else
return
end
target:EmitSound("Hero_Spirit_Breaker.Charge.Impact")
local effectIndex = ParticleManager:CreateParticle("particles/dzz/qingshanjiansheng_yjzcs.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, target:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
local damage = caster:THTD_GetStarDamage() * keys.power_damage
local targets = THTD_FindUnitsInRadius(caster, target:GetAbsOrigin(), keys.range)
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = DAMAGE_TYPE_MAGICAL,
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
end
local item3152_effect_caster = {
"particles/econ/items/queen_of_pain/qop_ti8_immortal/queen_ti8_golden_shadow_strike_debuff_crowrotating.vpcf",
"particles/econ/items/queen_of_pain/qop_ti8_immortal/queen_ti8_golden_shadow_strike_debuff_crowrotating_b.vpcf",
"particles/econ/items/queen_of_pain/qop_ti8_immortal/queen_ti8_golden_shadow_strike_debuff_crow.vpcf",
}
local item3152_effect_target = {
"particles/econ/items/queen_of_pain/qop_ti8_immortal/queen_ti8_golden_shadow_strike_debuff.vpcf",
"particles/econ/items/queen_of_pain/qop_ti8_immortal/queen_ti8_golden_shadow_strike_debuff_creep.vpcf",
}
function OnItem3152_SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if keys.ability:IsCooldownReady() then
keys.ability:StartCooldown(keys.ability:GetCooldown(0))
else
return
end
if caster.item3152_effect ~= nil then
ParticleManager:DestroyParticleSystem(caster.item3152_effect, true)
end
local effectIndex = ParticleManager:CreateParticle(item3152_effect_caster[RandomInt(1, #item3152_effect_caster)], PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControlEnt(effectIndex , 0, caster, 5, "attach_hitloc", Vector(0,0,0), true)
caster.item3152_effect = effectIndex
local effectIndex = ParticleManager:CreateParticle(item3152_effect_target[RandomInt(1, #item3152_effect_target)], PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControlEnt(effectIndex , 0, target, 5, "attach_hitloc", Vector(0,0,0), true)
ParticleManager:DestroyParticleSystem(effectIndex,false)
if not caster:THTD_IsTower() then return end
local damage = caster:THTD_GetStarDamage() * keys.power_damage
local targets = THTD_FindUnitsInRadius(caster, target:GetAbsOrigin(), keys.range)
for k,v in pairs(targets) do
if not v:HasModifier("modifier_item_3152_debuff") then
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_item_3152_debuff", nil)
end
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = DAMAGE_TYPE_PURE,
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
end
function OnCreatedItem3150(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if caster:IsRealHero() then
return
end
caster:THTD_AddBasePower(keys.power_bonus or 0, "item_3150_bonus")
caster:THTD_AddBaseAttack(keys.power_bonus or 0, "item_3150_bonus")
end
function OnDestroyItem3150(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if caster:IsRealHero() then
return
end
caster:THTD_AddBasePower("item_3150_bonus")
caster:THTD_AddBaseAttack("item_3150_bonus")
local ability = keys.ability
if ability.spell_effect then
ParticleManager:DestroyParticle(ability.spell_effect, true)
ability.spell_effect = nil
end
end
function OnCreatedItem3151(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if caster:IsRealHero() then
return
end
caster:THTD_AddBasePower(keys.power_bonus or 0, "item_3151_bonus")
caster:THTD_AddBaseAttack(keys.power_bonus or 0, "item_3151_bonus")
end
function OnDestroyItem3151(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if caster:IsRealHero() then
return
end
caster:THTD_AddBasePower("item_3151_bonus")
caster:THTD_AddBaseAttack("item_3151_bonus")
end
function OnCreatedItem3152(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if caster:IsRealHero() then
return
end
caster:THTD_AddBasePower(keys.power_bonus or 0, "item_3152_bonus")
caster:THTD_AddBaseAttack(keys.power_bonus or 0, "item_3152_bonus")
end
function OnDestroyItem3152(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if caster:IsRealHero() then
return
end
caster:THTD_AddBasePower("item_3152_bonus")
caster:THTD_AddBaseAttack("item_3152_bonus")
end
function OnCreatedItem3153(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if caster:IsRealHero() then
return
end
caster:THTD_AddBasePower(keys.power_bonus or 0, "item_3153_bonus")
caster:THTD_AddBaseAttack(keys.power_bonus or 0, "item_3153_bonus")
local effectIndex = ParticleManager:CreateParticle("particles/econ/items/monkey_king/mk_ti9_immortal/mk_ti9_immortal_army_ring.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetAbsOrigin())
ParticleManager:SetParticleControl(effectIndex, 1, Vector(700,50,1))
caster.item3153_effect = effectIndex
local count = 0
caster:SetContextThink(DoUniqueString("thtd_item3153_cast"),
function()
count = count + 1
if count > 50 then
if caster.item3153_effect ~= nil then
ParticleManager:DestroyParticle(caster.item3153_effect, true)
caster.item3153_effect = nil
return nil
end
else
if caster.item3153_effect ~= nil then
ParticleManager:SetParticleControl(effectIndex, 1, Vector(700 - count * 15,50,1))
end
return 0.1
end
end,
0)
end
function OnDestroyItem3153(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if caster:IsRealHero() then
return
end
caster:THTD_AddBasePower("item_3153_bonus")
caster:THTD_AddBaseAttack("item_3153_bonus")
if caster.item3153_effect ~= nil then
ParticleManager:DestroyParticle(caster.item3153_effect, true)
end
caster:RemoveModifierByNameAndCaster("modifier_junko_01", caster)
end
function OnItem3153_SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if caster:IsRealHero() then return end
if keys.ability:IsCooldownReady() then
keys.ability:StartCooldown(keys.ability:GetCooldown(0))
else
return
end
local damageType = DAMAGE_TYPE_PURE
local pureDg = caster:GetDamageOutgoingPure()
local magicDg = caster:GetDamageOutgoingMagical()
local phyDg = caster:GetDamageOutgoingPhysical()
if pureDg >= magicDg and pureDg >= phyDg then
damageType = DAMAGE_TYPE_PURE
elseif magicDg >= pureDg and magicDg >= phyDg then
damageType = DAMAGE_TYPE_MAGICAL
elseif phyDg >= magicDg and phyDg >= pureDg then
damageType = DAMAGE_TYPE_PHYSICAL
end
local effectIndex = ParticleManager:CreateParticle("particles/units/heroes/hero_omniknight/omniknight_purification.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, target:GetAbsOrigin())
ParticleManager:SetParticleControl(effectIndex, 1, Vector(100,30,900))
ParticleManager:DestroyParticleSystemTime(effectIndex, 2.5)
local damage = caster:THTD_GetStarDamage() * keys.power_damage
local targets = THTD_FindUnitsInRadius(caster, target:GetAbsOrigin(), 700)
for k,v in pairs(targets) do
if not v:HasModifier("modifier_item_3153_debuff") then
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_item_3153_debuff", nil)
end
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = damageType,
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
end
function OnCreatedItem3153Debuff(keys)
keys.target:AddDamageIncomingAll(keys.damage_debuff, "thtd_item_3153_damage_up")
end
function OnDestroyItem3153Debuff(keys)
keys.target:AddDamageIncomingAll("thtd_item_3153_damage_up")
end

View File

@@ -0,0 +1,308 @@
function OnJunko01SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
-- if caster == target then return end
if not target:THTD_IsTower() then return end
if target:HasModifier("modifier_junko_01") then return end
if target:GetPlayerOwnerID() ~= caster:GetPlayerOwnerID() then return end
keys.ability:ApplyDataDrivenModifier(caster, target, "modifier_junko_01", nil)
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_junko/ability_junko_01_buff.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControlEnt(effectIndex , 0, target, 5, "follow_origin", Vector(0,0,0), true)
local hasCombo = caster:HasModifier("modifier_thtd_junko_01_combo_buff")
if hasCombo then
if THTD_IsValid(caster.ability_junko_01_target1) == false then
caster.ability_junko_01_target1 = target
elseif THTD_IsValid(caster.ability_junko_01_target2) == false then
caster.ability_junko_01_target2 = target
else
caster.ability_junko_01_target1 = caster.ability_junko_01_target2
caster.ability_junko_01_target2 = target
end
else
caster.ability_junko_01_target1 = target
end
target:SetContextThink(DoUniqueString("modifier_junko_01"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if target == nil or target:IsNull() or target:IsAlive() == false then
ParticleManager:DestroyParticleSystem(effectIndex,true)
if caster ~= nil and caster:IsNull() == false then
if caster.ability_junko_01_target1 == target then
caster.ability_junko_01_target1 = nil
elseif caster.ability_junko_01_target2 == target then
caster.ability_junko_01_target2 = nil
end
if caster.ability_junko_01_target1 == nil and caster.ability_junko_01_target2 == nil then
ParticleManager:DestroyParticleSystem(caster.ability_junko_01_effectIndex,true)
caster.ability_junko_01_effectIndex = nil
end
end
return nil
end
local isCancel = false
if THTD_IsValid(caster) == false then
isCancel = true
if caster ~= nil and caster:IsNull() == false then
caster.ability_junko_01_target1 = nil
caster.ability_junko_01_target2 = nil
end
else
if caster:HasModifier("modifier_thtd_junko_01_combo_buff") == false then
if caster.ability_junko_01_target2 ~= nil then
caster.ability_junko_01_target1 = caster.ability_junko_01_target2
caster.ability_junko_01_target2 = nil
end
end
isCancel = (caster.ability_junko_01_target1 ~= target and caster.ability_junko_01_target2 ~= target)
end
if isCancel then
if target:HasModifier("modifier_junko_01") then
target:RemoveModifierByName("modifier_junko_01")
end
ParticleManager:DestroyParticleSystem(effectIndex,true)
if caster ~= nil and caster:IsNull() == false then
if caster.ability_junko_01_target1 == target then
caster.ability_junko_01_target1 = nil
elseif caster.ability_junko_01_target2 == target then
caster.ability_junko_01_target2 = nil
end
end
if caster.ability_junko_01_target1 == nil and caster.ability_junko_01_target2 == nil then
ParticleManager:DestroyParticleSystem(caster.ability_junko_01_effectIndex,true)
caster.ability_junko_01_effectIndex = nil
end
return nil
end
return 0.2
end,
0.2)
end
function OnCreatedJunko01Buff(keys)
local target = keys.target
local bonus = 0
if target:GetUnitName() == "hecatia" then
bonus = keys.hecatia_up
else
bonus = keys.damage_up
end
target:AddDamageOutgoingPure(bonus, "thtd_junko_01_damage_up")
end
function OnUpgradeJunko01Buff(keys)
local caster = keys.caster
local targets = {}
if caster.ability_junko_01_target1 ~= nil then
table.insert(targets, caster.ability_junko_01_target1)
end
if caster.ability_junko_01_target2 ~= nil then
table.insert(targets, caster.ability_junko_01_target2)
end
for _,target in pairs(targets) do
local bonus = 0
if target:GetUnitName() == "hecatia" then
bonus = keys.hecatia_up
else
bonus = keys.damage_up
end
target:AddDamageOutgoingPure(bonus, "thtd_junko_01_damage_up")
end
targets = {}
end
function OnDestroyJunko01Buff(keys)
keys.target:AddDamageOutgoingPure("thtd_junko_01_damage_up")
end
function OnJunko02SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local casterForward = caster:GetForwardVector()
local casterPoint = caster:GetOrigin()
local point = THTDSystem:FindRadiusOnePointPerfectAOE(caster, caster:Script_GetAttackRange(), 390 * 2)
if point ~= nil then
casterForward = (Vector(point.x, point.y,casterPoint.z) - casterPoint):Normalized()
end
local duration_time = math.floor(keys.duration_time * 100 + 0.5) / 100
local tick = math.floor(keys.tick * 100 + 0.5) / 100
local time = duration_time
caster:SetContextThink("modifier_junko_02_think",
function()
if GameRules:IsGamePaused() then return 0.03 end
if not THTD_IsValid(caster) then return nil end
if time <= 0 then return nil end
local forwardCos = casterForward.x
local forwardSin = casterForward.y
local angle = (39 - 6.5 * RandomInt(0,12)) / 180 * math.pi
local forward = Vector( math.cos(angle)*forwardCos - math.sin(angle)*forwardSin,
forwardSin*math.cos(angle) + forwardCos*math.sin(angle),0)
local info =
{
Ability = keys.ability,
EffectName = "particles/heroes/thtd_junko/ability_junko_02.vpcf",
vSpawnOrigin = casterPoint + forward * 500 - casterForward * 500 + Vector(0,0,128),
fDistance = 1200,
fStartRadius = 150,
fEndRadius = 150,
Source = caster,
bHasFrontalCone = false,
bReplaceExisting = false,
iUnitTargetTeam = DOTA_UNIT_TARGET_TEAM_ENEMY,
iUnitTargetFlags = DOTA_UNIT_TARGET_FLAG_NONE,
iUnitTargetType = DOTA_UNIT_TARGET_HERO, -- 解决撞击后消失
fExpireTime = GameRules:GetGameTime() + 10.0,
bDeleteOnHit = false,
vVelocity = casterForward * 1800,
bProvidesVision = true,
iVisionRadius = 1000,
iVisionTeamNumber = caster:GetTeamNumber()
}
local projectile = ProjectileManager:CreateLinearProjectile(info)
ParticleManager:DestroyLinearProjectileSystem(projectile,false)
local targets =
FindUnitsInLine(
caster:GetTeamNumber(),
casterPoint,
casterPoint + casterForward * 1500,
nil,
390,
keys.ability:GetAbilityTargetTeam(),
keys.ability:GetAbilityTargetType(),
keys.ability:GetAbilityTargetFlags()
)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
time = time - tick
return tick
end,
tick)
end
function OnJunko03SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local friends = THTD_FindFriendlyUnitsAll(caster)
local duration_time = math.floor(keys.duration_time * 100 + 0.5) / 100
local damage_up = keys.damage_up
local power_suck = keys.power_suck
local modifier = caster:FindModifierByName("modifier_junko_03_buff")
if modifier == nil then
keys.ability:ApplyDataDrivenModifier(caster, caster, "modifier_junko_03_buff", nil)
else
modifier:SetDuration(duration_time, false)
end
local total = 0
for k,v in pairs(friends) do
if v ~= caster then
local power = v:THTD_GetBasePower()
local bonus_power = math.min(power, power_suck)
if bonus_power > 0 then
total = total + bonus_power
v:THTD_AddBasePower(-bonus_power)
v:SetContextThink(DoUniqueString("dota_timer"),
function()
if GameRules:IsGamePaused() then return 0.1 end
v:THTD_AddBasePower(bonus_power)
return nil
end,
duration_time)
end
end
end
if total > 0 then
caster:THTD_AddBasePower(total)
caster:SetContextThink(DoUniqueString("dota_timer"),
function()
if GameRules:IsGamePaused() then return 0.1 end
caster:THTD_AddBasePower(-total)
return nil
end,
duration_time)
end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_junko/ability_junko_03.vpcf", PATTACH_CUSTOMORIGIN, nil)
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetAbsOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
function OnCreatedJunko03Buff(keys)
keys.target:AddDamageOutgoingAll(keys.damage_up, "thtd_junko_03_damage_up")
end
function OnDestroyJunko03Buff(keys)
keys.target:AddDamageOutgoingAll("thtd_junko_03_damage_up")
end
function OnJunko04SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability, 1)
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.range)
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
-- UnitDamageTarget(DamageTable)
if THTD_IsValid(v) and v:HasModifier("modifier_junko_04_debuff") == false then
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_junko_04_debuff", nil)
end
end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_junko/ability_junko_04.vpcf", PATTACH_CUSTOMORIGIN, nil)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint+Vector(0,0,64))
ParticleManager:SetParticleControl(effectIndex, 1, Vector(1,0,0))
ParticleManager:SetParticleControl(effectIndex, 2, Vector(255,255,255))
ParticleManager:SetParticleControl(effectIndex, 3, targetPoint)
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
function OnThinkJunko04Debuff(keys)
local caster = keys.caster
local target = keys.target
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability, 2)
local DamageTable = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end

View File

@@ -0,0 +1,99 @@
function OnSpellStartKagerou01(keys)
local caster = keys.caster
local targetPoint = keys.target_points[1]
local vecForward = (targetPoint - caster:GetOrigin()):Normalized()
local angles = VectorToAngles(vecForward) -- 该方向的角度水平向右逆时针旋转360度
print(angles.y)
local angles2 = VectorToAngles(caster:GetForwardVector()) -- 朝向的角度
print(angles2.y)
end
function OnSpellStartKagerou02(keys)
local caster = keys.caster
local duraiton_time = keys.duration_time
caster:RemoveModifierByName("modifier_kagerou_02_buff")
keys.ability:ApplyDataDrivenModifier(caster, caster, "modifier_kagerou_02_buff", {Duration = duraiton_time})
end
function OnCreatedKagerou02Buff(keys)
local target = keys.target
local powerBonus = 0
local pv = target:GetAbilityPowerValue(keys.ability:GetAbilityName())
if pv ~= nil then
powerBonus = pv[1]
end
if target:IsPower666() then
powerBonus = powerBonus + 30
end
local power = target:THTD_GetBasePower()
local bonus = (keys.bonus_attack + powerBonus) * power
target:THTD_AddBaseAttack(bonus, "thtd_kagerou_02_bonus")
target:THTD_AddBasePower(-power, "thtd_kagerou_02_bonus")
target:THTD_AddAttackSpeed(keys.attack_speed, "thtd_kagerou_02_bonus")
end
function OnDestroyKagerou02Buff(keys)
local target = keys.target
target:THTD_AddBaseAttack("thtd_kagerou_02_bonus")
target:THTD_AddBasePower("thtd_kagerou_02_bonus")
target:THTD_AddAttackSpeed("thtd_kagerou_02_bonus")
end
function OnSpellStartKagerou03(keys)
local caster = keys.caster
local powerDuration = 0
local powerAttackup = 0
local pv = caster:GetAbilityPowerValue(keys.ability:GetAbilityName())
if pv ~= nil then
powerAttackup = pv[1]
powerDuration = pv[2]
end
local attack_up = keys.attack_up + powerAttackup
local duraiton_time = keys.duration_time + powerDuration
local shiftTime = 0.5
UnitStunTarget(caster,caster,shiftTime)
caster:SetContextThink(DoUniqueString("thtd_yuuka_02_plant"),
function()
if GameRules:IsGamePaused() then return 0.03 end
caster.kagerou_03_attack_percentage = attack_up
keys.ability:ApplyDataDrivenModifier(caster, caster, "modifier_kagerou_03_wolf", {Duration = duraiton_time})
return nil
end,
shiftTime)
end
function OnCreatedKagerou03wolf(keys)
local target = keys.target
local model = "models/heroes/lycan/lycan_wolf.vmdl"
if target.origin_mode == nil then
target.origin_mode = target:GetModelName()
end
target:SetOriginalModel(model)
target:SetModel(model)
target:THTD_AddAttackPercentage(target.kagerou_03_attack_percentage, "thtd_kagerou_03_bonus")
target:THTD_AddCritChance(keys.crit_chance, "thtd_kagerou_03_bonus")
local bonus = keys.crit_damage
if target:IsPower999() then
bonus = bonus + 500
end
target:THTD_AddCritDamage(bonus, "thtd_kagerou_03_bonus")
end
function OnDestroyKagerou03wolf(keys)
local target = keys.target
target:SetOriginalModel(target.origin_mode )
target:SetModel(target.origin_mode )
target:THTD_AddAttackPercentage("thtd_kagerou_03_bonus")
target:THTD_AddCritChance("thtd_kagerou_03_bonus")
target:THTD_AddCritDamage("thtd_kagerou_03_bonus")
end

View File

@@ -0,0 +1,314 @@
function OnKaguya01SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local count = keys.max_count
caster:SetContextThink(DoUniqueString("thtd_kaguya01_spell_think"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if count <= 0 then
return nil
end
OnKaguya01SpellThink(keys,count)
count = count - 1
return 0.7
end,
0)
end
function OnKaguya01SpellThink(keys,count)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
for i=1,count*5 do
local forwardVector = caster:GetForwardVector()
local rollRad = i*math.pi*2/(count*5)
local forwardCos = forwardVector.x
local forwardSin = forwardVector.y
local damageVector = Vector(math.cos(rollRad)*forwardCos - math.sin(rollRad)*forwardSin,
forwardSin*math.cos(rollRad) + forwardCos*math.sin(rollRad),
0) * count*100 + targetPoint
local effectIndex
if((i*count*5)%3==0)then
effectIndex = ParticleManager:CreateParticle("particles/thd2/heroes/kaguya/ability_kaguya01_light.vpcf", PATTACH_CUSTOMORIGIN, nil)
elseif((i*count*5)%3==1)then
effectIndex = ParticleManager:CreateParticle("particles/thd2/heroes/kaguya/ability_kaguya01_light_green.vpcf", PATTACH_CUSTOMORIGIN, nil)
elseif((i*count*5)%3==2)then
effectIndex = ParticleManager:CreateParticle("particles/thd2/heroes/kaguya/ability_kaguya01_light_red.vpcf", PATTACH_CUSTOMORIGIN, nil)
end
ParticleManager:SetParticleControl(effectIndex, 0, damageVector)
ParticleManager:SetParticleControl(effectIndex, 1, damageVector)
ParticleManager:DestroyParticleSystem(effectIndex,false)
local targets = THTD_FindUnitsInRadius(caster,damageVector,keys.range)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
end
end
function OnKaguya02SpellThink(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if keys.ability:GetLevel() < 1 then return end
if caster.thtd_kaguya_02_count == nil then
caster.thtd_kaguya_02_count = 0
end
if caster.thtd_kaguya_02_count == 0 then
local effectName = "particles/econ/items/windrunner/wr_ti8_immortal_shoulder/wr_ti8_shackleshot_pair_rope_target_glow.vpcf"
local effectIndex = ParticleManager:CreateParticle(effectName, PATTACH_ABSORIGIN_FOLLOW, caster)
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetOrigin() + Vector(0, 0, 100))
ParticleManager:ReleaseParticleIndex(effectIndex)
end
caster.thtd_kaguya_02_count = caster.thtd_kaguya_02_count + 1
if caster.thtd_kaguya_02_count >= 20 then
caster.thtd_kaguya_02_count = 0
end
local targets = THTD_FindFriendlyUnitsInRadius(caster,caster:GetAbsOrigin(),1000)
for k,v in pairs(targets) do
local modifier = v:FindModifierByName("modifier_kaguya_02_buff")
-- 持续时间比think大一点
if modifier == nil then
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_kaguya_02_buff", {Duration = 0.3})
else
modifier:SetDuration(0.3, false)
end
end
end
function OnCreatedKaguya02_buff(keys)
local target = keys.target
local factor = 0.5
if target:GetUnitName() == "kaguya" then
factor = 1
end
target:THTD_AddCritChance(keys.bonus_chance * factor, "thtd_kaguya_02_bonus")
target:THTD_AddCritDamage(keys.bonus_crit * factor, "thtd_kaguya_02_bonus")
end
function OnRemoveKaguya02_buff(keys)
local target = keys.target
target:THTD_AddCritChance("thtd_kaguya_02_bonus")
target:THTD_AddCritDamage("thtd_kaguya_02_bonus")
end
function OnKaguya03SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if caster.thtd_kaguya_03_roll == false then
caster.thtd_kaguya_03_roll = true
else
caster.thtd_kaguya_03_roll = false
end
end
function OnUpgradeKaguya03(keys)
local caster = keys.caster
local friends = THTD_FindFriendlyUnitsAll(caster)
local enemies = THTD_FindUnitsAll(caster)
for i=1,4 do
local buff = "modifier_kaguya_03_"..i.."_buff"
local debuff = "modifier_kaguya_03_"..i.."_debuff"
for k,v in pairs(friends) do
if v:FindModifierByNameAndCaster(buff,caster)~=nil then
v:RemoveModifierByName(buff)
end
end
for k,v in pairs(enemies) do
if v:FindModifierByNameAndCaster(debuff,caster)~=nil then
v:RemoveModifierByName(debuff)
end
end
end
end
function OnKaguya03SpellThink(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if keys.ability:GetLevel() < 1 then return end
if GameRules:IsGamePaused() then return end
if caster:THTD_IsHidden() then
OnKaguya03ReleaseBall(caster)
return
end
if caster.thtd_kaguya_03_treasure_table == nil then
caster.thtd_kaguya_03_treasure_table = {}
end
if caster.thtd_kaguya_03_think_count == nil then
caster.thtd_kaguya_03_think_count = 0
end
if caster.thtd_kaguya_03_roll ~= false then
if caster.thtd_kaguya_03_think_count < 360 then
caster.thtd_kaguya_03_think_count = caster.thtd_kaguya_03_think_count + 1
else
caster.thtd_kaguya_03_think_count = 0
end
end
if caster.thtd_effect_count == nil then
caster.thtd_effect_count = 1
end
-- 旋转宝具
for i=1,4 do
if caster.thtd_kaguya_03_treasure_table[i] == nil then
caster.thtd_kaguya_03_treasure_table[i] = {}
end
if caster.thtd_kaguya_03_treasure_table[i]["effectIndex"] == nil then
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_kaguya/thtd_kaguya_03_"..i..".vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 1, Vector(1/12,0,0))
ParticleManager:SetParticleControl(effectIndex, 2, Vector(500/12,0,0))
caster.thtd_kaguya_03_treasure_table[i]["effectIndex"] = effectIndex
end
if caster.thtd_kaguya_03_roll ~= false then
caster.thtd_kaguya_03_treasure_table[i]["origin"] = caster:GetOrigin() +
Vector(
math.cos(i*2*math.pi/4 + caster.thtd_kaguya_03_think_count * math.pi/180)*400,
math.sin(i*2*math.pi/4 + caster.thtd_kaguya_03_think_count * math.pi/180)*400,
150)
end
end
local friends = {}
local enemies = {}
if caster.thtd_effect_count >= 10 then
friends = THTD_FindFriendlyUnitsAll(caster)
enemies = THTD_FindUnitsAll(caster)
end
for i=1,4 do
if caster.thtd_kaguya_03_treasure_table[i]["effectIndex"] ~= nil then
ParticleManager:SetParticleControl(caster.thtd_kaguya_03_treasure_table[i]["effectIndex"], 0, caster.thtd_kaguya_03_treasure_table[i]["origin"] )
end
if caster.thtd_effect_count >= 10 then
local buff = "modifier_kaguya_03_"..i.."_buff"
local debuff = "modifier_kaguya_03_"..i.."_debuff"
for k,v in pairs(friends) do
if GetDistanceBetweenTwoVec2D(caster.thtd_kaguya_03_treasure_table[i]["origin"], v:GetOrigin()) > keys.range then
if v:FindModifierByNameAndCaster(buff,caster)~=nil then
v:RemoveModifierByName(buff)
end
else
if v:HasModifier(buff) == false then
keys.ability:ApplyDataDrivenModifier(caster, v, buff, {})
end
end
end
for k,v in pairs(enemies) do
if GetDistanceBetweenTwoVec2D(caster.thtd_kaguya_03_treasure_table[i]["origin"], v:GetOrigin()) > keys.range then
if v:FindModifierByNameAndCaster(debuff,caster)~=nil then
v:RemoveModifierByName(debuff)
end
else
if i ~= 2 and v:HasModifier(debuff) == false then
keys.ability:ApplyDataDrivenModifier(caster, v, debuff, {})
end
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * 0.2
if i == 2 then
damage = damage * (1 + keys.damage_up/100)
end
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
end
if i == 4 then caster.thtd_effect_count = 1 end
else
if i == 4 then caster.thtd_effect_count = caster.thtd_effect_count + 1 end
end
end
end
function OnKaguya03ReleaseBall(caster)
if caster.thtd_kaguya_03_treasure_table ~= nil and caster.thtd_kaguya_03_treasure_table[1] ~= nil and caster.thtd_kaguya_03_treasure_table[1]["effectIndex"] ~= nil then
local friends = THTD_FindFriendlyUnitsAll(caster)
local enemies = THTD_FindUnitsAll(caster)
for i=1,4 do
local buff = "modifier_kaguya_03_"..i.."_buff"
local debuff = "modifier_kaguya_03_"..i.."_debuff"
for k,v in pairs(friends) do
if v:FindModifierByNameAndCaster(buff,caster)~=nil then
v:RemoveModifierByName(buff)
end
end
for k,v in pairs(enemies) do
if v:FindModifierByNameAndCaster(debuff,caster)~=nil then
v:RemoveModifierByName(debuff)
end
end
if caster.thtd_kaguya_03_treasure_table[i]["effectIndex"] ~= nil then
ParticleManager:DestroyParticleSystem(caster.thtd_kaguya_03_treasure_table[i]["effectIndex"],true)
caster.thtd_kaguya_03_treasure_table[i]["effectIndex"] = nil
end
end
end
end
function OnCreatedKaguya03_2_buff(keys)
keys.target:THTD_AddAttackPercentage(keys.attack_percent, "thtd_kaguya_03_2_buff_bonus")
end
function OnDestroyKaguya03_2_buff(keys)
keys.target:THTD_AddAttackPercentage("thtd_kaguya_03_2_buff_bonus")
end
function OnCreatedKaguya03_3_debuff(keys)
keys.target:AddDamageIncomingAll(keys.incoming_percent, "thtd_kaguya_03_3_debuff_damage_up")
end
function OnRemoveKaguya03_3_debuff(keys)
keys.target:AddDamageIncomingAll("thtd_kaguya_03_3_debuff_damage_up")
end
function OnCreatedKaguya03_3_buff(keys)
keys.target:AddDamageOutgoingAll(keys.outgoing_percent, "thtd_kaguya_03_3_damage_up")
end
function OnDestroyKaguya03_3_buff(keys)
keys.target:AddDamageOutgoingAll("thtd_kaguya_03_3_damage_up")
end
function OnCreatedKaguya03_4_debuff(keys)
local target = keys.target
target:AddPhysicalArmor(-keys.armor)
end
function OnDestroyKaguya03_4_debuff(keys)
local target = keys.target
target:AddPhysicalArmor(keys.armor)
end
function OnCreatedKaguya03_4_buff(keys)
keys.target:AddDamageOutgoingPhysical(keys.penetration, "thtd_kaguya_03_4_damage_up")
end
function OnDestroyKaguya03_4_buff(keys)
keys.target:AddDamageOutgoingPhysical("thtd_kaguya_03_4_damage_up")
end

View File

@@ -0,0 +1,368 @@
local doorVec =
{
[0] = Vector(-2440,1880,0),
[1] = Vector(2440,1880,0),
[2] = Vector(2440,-1880,0),
[3] = Vector(-2440,-1880,0),
}
local outX =
{
[0] = -4300,
[1] = 4300,
[2] = 4300,
[3] = -4300
}
function OnKanako01SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target:GetOrigin()
local targetForward = keys.target:GetForwardVector()
local duration_time = math.floor(keys.duration_time * 100 + 0.5)/100
local tick = math.floor(keys.tick * 100 + 0.5)/100
local id = caster:GetPlayerOwnerID()
if math.abs(targetPoint.x) <= math.abs(doorVec[id].x) then
if GetDistanceBetweenTwoVec2D(targetPoint, FirstPointList[id]) < 1200 then
targetForward = (targetPoint - FirstPointList[id]):Normalized()
end
else
if GetDistanceBetweenTwoVec2D(targetPoint, FirstPointList[id]) < 2000 then
targetForward = (Vector(outX[id], targetPoint.y, 0) - targetPoint):Normalized()
end
end
local info =
{
Ability = keys.ability,
EffectName = "particles/heroes/kanako/ability_kanako_01.vpcf",
vSpawnOrigin = targetPoint + Vector(0,0,128),
fDistance = 500,
fStartRadius = 400,
fEndRadius = 400,
Source = caster,
bHasFrontalCone = false,
bReplaceExisting = false,
iUnitTargetTeam = DOTA_UNIT_TARGET_TEAM_ENEMY,
iUnitTargetFlags = DOTA_UNIT_TARGET_FLAG_NONE,
iUnitTargetType = DOTA_UNIT_TARGET_HERO,
fExpireTime = GameRules:GetGameTime() + 10.0,
bDeleteOnHit = false,
vVelocity = -targetForward * 200,
bProvidesVision = true,
iVisionRadius = 1000,
iVisionTeamNumber = caster:GetTeamNumber()
}
local projectile = ProjectileManager:CreateLinearProjectile(info)
caster:SetContextThink(DoUniqueString("thtd_kanako_01_projectile"),
function()
if GameRules:IsGamePaused() then return 0.03 end
ParticleManager:DestroyLinearProjectileSystem(projectile,false)
return nil
end,
duration_time - 1.25)
local origin = targetPoint + targetForward * 150
local time = duration_time
local count = 0
local knockBackGroup = {}
caster:SetContextThink(DoUniqueString("thtd_kanako_01_think"),
function()
if GameRules:IsGamePaused() then return 0.03 end
count = count + 1
local targets = THTD_FindUnitsInRadius(caster,origin,300)
origin = origin - targetForward * 8
for k,v in pairs(targets) do
local forward = v:GetForwardVector()
v:SetAbsOrigin(v:GetOrigin() - forward * 16)
table.insert(knockBackGroup,v)
if count == 5 then
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
local modifier = v:FindModifierByName("modifier_kanako_01_stun")
if modifier == nil then
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_kanako_01_stun", {duration=0.1})
else
modifier:SetDuration(0.1,false)
end
end
if count == 5 then
count = 0
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_kanako/ability_kanako_01_explosion.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, origin+Vector(0,0,160) - targetForward * 150)
ParticleManager:SetParticleControlForward(effectIndex, 0, targetForward)
ParticleManager:SetParticleControl(effectIndex, 1, Vector(100,1,1))
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
if time <= 0 then
for k,v in pairs(knockBackGroup) do
if IsValidAlive(v) then
FindClearSpaceForUnit(v, v:GetOrigin(), false)
end
end
knockBackGroup = {}
return nil
end
time = time - 0.04
return 0.04
end,
0.04)
end
function OnKanako02SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
if caster.thtd_kanako_gojou_count == nil then
caster.thtd_kanako_gojou_count = 0
end
if caster.thtd_kanako_gojou_count < keys.max_count then
local gojou = CreateUnitByName(
"kanako_gojou",
targetPoint,
false,
caster:GetOwner(),
caster:GetOwner(),
caster:GetTeam()
)
if gojou ~= nil then
gojou.thtd_spawn_unit_owner = caster
gojou:SetControllableByPlayer(caster:GetPlayerOwnerID(), true)
FindClearSpaceForUnit(gojou, targetPoint, false)
keys.ability:ApplyDataDrivenModifier(caster, gojou, "modifier_kanako_rooted", {})
local ability = gojou:FindAbilityByName("thtd_kanako_03_unit")
if ability then
ability:SetLevel(1)
end
if caster.thtd_kanako_gojou_group == nil then
caster.thtd_kanako_gojou_group = {}
end
table.insert(caster.thtd_kanako_gojou_group,gojou)
caster.thtd_kanako_gojou_count = caster.thtd_kanako_gojou_count + 1
end
end
end
function OnKanako03Think(keys)
if GameRules:IsGamePaused() then return end
local caster = EntIndexToHScript(keys.caster_entindex)
if caster.thtd_kanako_gojou_group == nil then
caster.thtd_kanako_gojou_group = {}
end
if keys.ability:GetLevel() < 1 or caster:THTD_IsHidden() then
for k,v in pairs(caster.thtd_kanako_gojou_group) do
OnKanako03ReleaseUnit(caster,v)
end
return
end
for k,v in pairs(caster.thtd_kanako_gojou_group) do
v.thtd_kanako_gojou_thinked = nil
end
for k,v in pairs(caster.thtd_kanako_gojou_group) do
if IsValidAlive(v) and v.thtd_kanako_03_is_contact == true and IsValidAlive(v.thtd_kanako_03_last_link_unit) then
if v.thtd_kanako_gojou_thinked ~= true then
v.thtd_kanako_gojou_thinked = true
v.thtd_kanako_03_last_link_unit.thtd_kanako_gojou_thinked = true
local targets =
FindUnitsInLine(
caster:GetTeamNumber(),
v:GetOrigin(),
v.thtd_kanako_03_last_link_unit:GetOrigin(),
nil,
80,
keys.ability:GetAbilityTargetTeam(),
keys.ability:GetAbilityTargetType(),
keys.ability:GetAbilityTargetFlags()
)
local vecA = v:GetAbsOrigin()
local vecB = v.thtd_kanako_03_last_link_unit:GetAbsOrigin()
local key = "thtd_kanako_gojou_"..tostring(v:GetEntityIndex()).."_side"
for index,unit in pairs(targets) do
local side = IsLeftToLineSide(unit:GetAbsOrigin(), vecA, vecB)
if unit[key] == nil then
unit[key] = IsLeftToLineSide(unit:GetAbsOrigin() - 100 * unit:GetForwardVector(), vecA, vecB)
end
if unit[key] ~= side then
-- print("[unit"..tostring(unit:GetEntityIndex()).."]"..key.." : "..tostring(side))
unit[key] = side
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
local DamageTable = {
ability = keys.ability,
victim = unit,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
end
end
end
end
end
function OnKanako03SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if target:GetUnitName() == "kanako_gojou" then
OnKanako03ReleaseUnit(caster,target)
end
end
function OnKanako03ReleaseUnit(caster,target)
if caster.thtd_kanako_gojou_group == nil then
caster.thtd_kanako_gojou_group = {}
end
for k,v in pairs(caster.thtd_kanako_gojou_group) do
if v==nil or v:IsNull() or v:IsAlive()==false or v == target then
if v.thtd_kanako_03_gojou_effect~=nil then
ParticleManager:DestroyParticleSystem(v.thtd_kanako_03_gojou_effect,true)
end
if v.thtd_kanako_03_last_link_unit ~= nil and v.thtd_kanako_03_last_link_unit:IsNull()==false and v.thtd_kanako_03_last_link_unit:IsAlive() then
if v.thtd_kanako_03_last_link_unit.thtd_kanako_03_gojou_effect ~= nil then
ParticleManager:DestroyParticleSystem(v.thtd_kanako_03_last_link_unit.thtd_kanako_03_gojou_effect,true)
v.thtd_kanako_03_last_link_unit.thtd_kanako_03_gojou_effect = nil
end
v.thtd_kanako_03_last_link_unit.thtd_kanako_03_is_contact = false
end
table.remove(caster.thtd_kanako_gojou_group,k)
caster.thtd_kanako_gojou_count = caster.thtd_kanako_gojou_count - 1
end
end
target:AddNoDraw()
target:ForceKill(true)
end
function OnKanako03UnitSpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local hero = caster.thtd_spawn_unit_owner
if target:GetUnitName() == "kanako_gojou" and caster~=target and target.thtd_kanako_03_is_contact ~= true then
if caster.thtd_kanako_03_last_link_unit ~= nil and caster.thtd_kanako_03_last_link_unit:IsNull()==false and caster.thtd_kanako_03_last_link_unit:IsAlive() then
caster.thtd_kanako_03_last_link_unit.thtd_kanako_03_is_contact = false
ParticleManager:DestroyParticleSystem(caster.thtd_kanako_03_last_link_unit.thtd_kanako_03_gojou_effect,true)
caster.thtd_kanako_03_last_link_unit.thtd_kanako_03_gojou_effect = nil
end
caster.thtd_kanako_03_last_link_unit = target
target.thtd_kanako_03_last_link_unit = caster
target.thtd_kanako_03_is_contact = true
caster.thtd_kanako_03_is_contact = true
if caster.thtd_kanako_03_gojou_effect == nil then
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_kanako/ability_kanako_03_line.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControlEnt(effectIndex , 0, caster, 5, "attach_hitloc", Vector(0,0,0), true)
ParticleManager:SetParticleControlEnt(effectIndex , 1, target, 5, "attach_hitloc", Vector(0,0,0), true)
caster.thtd_kanako_03_gojou_effect = effectIndex
else
ParticleManager:SetParticleControlEnt(caster.thtd_kanako_03_gojou_effect , 1, target, 5, "attach_hitloc", Vector(0,0,0), true)
end
end
end
function OnKanako04SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local origin = caster:GetOrigin()
local time = keys.ability:GetCooldownTimeRemaining()
local tick = keys.tick
time = math.floor(time * 100 + 0.5) / 100
tick = math.floor(tick * 100 + 0.5) / 100
local key = "thtd_kanako_04_"..tostring(caster:GetEntityIndex()).."_circle"
keys.ability:ApplyDataDrivenModifier(caster, caster, "modifier_kanako_04_effect", {duration = time})
caster:THTD_AddCritChance(keys.crit_chance, "thtd_kanako_04_crit_chance")
caster:SetContextThink(DoUniqueString("thtd_kanako_04_think"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if caster:THTD_IsHidden() or time <= 0 then
caster:RemoveModifierByName("modifier_kanako_04_effect")
caster:AddDamageOutgoingAll("thtd_kanako_04_bonus")
caster:THTD_AddCritChance("thtd_kanako_04_crit_chance")
return nil
end
if caster:HasModifier("modifier_sanae_04_buff") then
caster:AddDamageOutgoingAll(math.floor(caster:THTD_GetFaith() * keys.damage_up), "thtd_kanako_04_bonus")
else
caster:AddDamageOutgoingAll("thtd_kanako_04_bonus")
end
local targets = THTD_FindUnitsInRadius(caster,origin,keys.range + 80)
for k,v in pairs(targets) do
local isInCircle = (GetDistanceBetweenTwoVec2D(v:GetAbsOrigin(), origin) <= keys.range)
if v[key] == nil then
v[key] = (GetDistanceBetweenTwoVec2D(v:GetAbsOrigin() - 80 * v:GetForwardVector(), origin) <= keys.range)
end
if v[key] ~= isInCircle then
-- print("[unit"..tostring(v:GetEntityIndex()).."]"..key.." : "..tostring(isInCircle))
v[key] = isInCircle
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability, 1)
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability, 2)
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
time = time - tick
return tick
end,
tick)
end
function OnKanakoKill(keys)
-- local caster = EntIndexToHScript(keys.caster_entindex)
-- caster:THTD_AddFaith()
end

View File

@@ -0,0 +1,286 @@
THTD_KEINE_02_HUMEN = 1
THTD_KEINE_02_SHIRASAWA = 2
function OnKeine01SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if caster.thtd_keine_change == nil then
caster.thtd_keine_change = THTD_KEINE_02_HUMEN
end
if caster.thtd_keine_change == THTD_KEINE_02_HUMEN then
if target:THTD_IsTower() then
caster.thtd_last_cast_unit = target
if target:HasModifier("modifier_keine_01_buff") then
target:FindModifierByName("modifier_keine_01_buff"):SetDuration(keys.bonus_time, false)
else
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_keine/ability_keine_01_buff.vpcf", PATTACH_CUSTOMORIGIN, target)
ParticleManager:SetParticleControlEnt(effectIndex , 0, target, 5, "follow_origin", Vector(0,0,0), true)
keys.ability:ApplyDataDrivenModifier(caster,target, "modifier_keine_01_buff", {duration = keys.bonus_time})
end
end
end
end
function OnCreatedKeine01Buff(keys)
keys.target:THTD_AddBaseAttack(keys.attack_bonus, "thtd_keine_01_bonus")
end
function OnDestroyKeine01Buff(keys)
keys.target:THTD_AddBaseAttack("thtd_keine_01_bonus")
end
function OnKeine01AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local targetPoint = target:GetOrigin()
if caster.thtd_keine_change == THTD_KEINE_02_SHIRASAWA then
if RollPercentage(keys.chance) then
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_keine/ability_keine_01_stun.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
ParticleManager:SetParticleControl(effectIndex, 1, Vector(keys.range,keys.range,keys.range))
ParticleManager:DestroyParticleSystem(effectIndex,false)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.range)
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
if not v:HasModifier("modifier_keine_01_lock") then
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_keine_01_lock", {Duration = keys.lock_time})
UnitStunTarget(caster,v,keys.stun_time)
end
end
end
end
end
function OnKeine02SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if caster.thtd_keine_change == nil then
caster.thtd_keine_change = THTD_KEINE_02_HUMEN
end
if caster.thtd_keine_change == THTD_KEINE_02_HUMEN then
caster.thtd_keine_change = THTD_KEINE_02_SHIRASAWA
caster:SetModel("models/thd_hero/keine/keine2/keine2.vmdl")
caster:SetOriginalModel("models/thd_hero/keine/keine2/keine2.vmdl")
if caster.thtd_close_ai == true then
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_keine_shirasawa", duration=5, params={}, color="#0ff"} )
end
elseif caster.thtd_keine_change == THTD_KEINE_02_SHIRASAWA then
caster.thtd_keine_change = THTD_KEINE_02_HUMEN
caster:SetModel("models/thd_hero/keine/keine.vmdl")
caster:SetOriginalModel("models/thd_hero/keine/keine.vmdl")
if caster.thtd_close_ai == true then
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_keine_humen", duration=5, params={}, color="#0ff"} )
end
end
end
function OnKeine03SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.range1)
if caster.thtd_keine_change == nil then
caster.thtd_keine_change = THTD_KEINE_02_HUMEN
end
if caster.thtd_keine_change == THTD_KEINE_02_HUMEN then
for k,v in pairs(targets) do
Keine03MarkUnit(v)
local modifier = v:FindModifierByName("thtd_keine_03_debuff")
if modifier==nil and v.thtd_keine_mark_count < keys.max_count then
keys.ability:ApplyDataDrivenModifier(caster, v, "thtd_keine_03_debuff", nil)
end
end
elseif caster.thtd_keine_change == THTD_KEINE_02_SHIRASAWA then
for k,v in pairs(targets) do
if v:HasModifier("thtd_keine_03_debuff") then
v.thtd_keine_mark_count = v.thtd_keine_mark_count + 1
v:RemoveModifierByName("thtd_keine_03_debuff")
end
end
end
end
function Keine03MarkUnit(unit)
unit.thtd_keine_mark_count = 0
unit.thtd_keine_03_origin = unit:GetOrigin()
unit.thtd_keine_03_mark_health = unit:GetHealth()
unit.thtd_keine_03_next_move_point = unit.next_move_point
unit.thtd_keine_03_next_move_forward = unit.next_move_forward
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_keine/ability_keine_03.vpcf", PATTACH_CUSTOMORIGIN, unit)
ParticleManager:SetParticleControl(effectIndex, 0, unit:GetOrigin())
ParticleManager:SetParticleControl(effectIndex, 1, unit:GetOrigin())
ParticleManager:SetParticleControl(effectIndex, 2, unit:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
function OnKeine03AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if RollPercentage(keys.chance) then
local targetPoint = target:GetOrigin()
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.range2)
if caster.thtd_keine_change == THTD_KEINE_02_HUMEN then
for k,v in pairs(targets) do
Keine03MarkUnit(v)
local modifier = v:FindModifierByName("thtd_keine_03_debuff")
if modifier==nil and v.thtd_keine_mark_count < keys.max_count then
keys.ability:ApplyDataDrivenModifier(caster, v, "thtd_keine_03_debuff", nil)
end
end
else
for k,v in pairs(targets) do
if v:HasModifier("thtd_keine_03_debuff") then
v.thtd_keine_mark_count = v.thtd_keine_mark_count + 1
v:RemoveModifierByName("thtd_keine_03_debuff")
end
end
end
end
end
function OnKeine03Destroy(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if target~=nil and target:IsNull()==false and target:IsAlive() and target.thtd_keine_03_origin ~= nil then
local distance = GetDistanceBetweenTwoVec2D(target:GetOrigin(), target.thtd_keine_03_origin)
local effectIndex = ParticleManager:CreateParticle("particles/bosses/thtd_keine/ability_bosses_keine.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, target:GetOrigin())
FindClearSpaceForUnit(target,target.thtd_keine_03_origin,false)
ParticleManager:SetParticleControl(effectIndex, 2, target:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
target.next_move_point = target.thtd_keine_03_next_move_point
target.next_move_forward = target.thtd_keine_03_next_move_forward
target.thtd_keine_03_origin = nil
local currentHealth = target:GetHealth()
local decrease_health = target.thtd_keine_03_mark_health - currentHealth
target:SetHealth(target.thtd_keine_03_mark_health)
local ability = caster:FindAbilityByName("thtd_keine_04")
if ability:GetLevel() >= 1 then
if caster.thtd_keine_04_change == THTD_KEINE_04_SWORD then
OnKeine04Sword(keys)
elseif caster.thtd_keine_04_change == THTD_KEINE_04_JADE then
OnKeine04Jade(keys,distance)
elseif caster.thtd_keine_04_change == THTD_KEINE_04_MIRROR then
OnKeine04Mirror(keys,decrease_health,currentHealth)
end
end
end
end
function OnKeine04Sword(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local info =
{
Target = keys.target,
Source = caster,
Ability = keys.ability,
EffectName = "particles/heroes/thtd_keine/ability_keine_04_sword.vpcf",
iMoveSpeed = 1400,
vSourceLoc= caster:GetAbsOrigin(), -- Optional (HOW)
bDrawsOnMinimap = false, -- Optional
bDodgeable = true, -- Optional
bIsAttack = false, -- Optional
bVisibleToEnemies = true, -- Optional
bReplaceExisting = false, -- Optional
flExpireTime = GameRules:GetGameTime() + 10, -- Optional but recommended
bProvidesVision = true, -- Optional
iVisionRadius = 400, -- Optional
iVisionTeamNumber = caster:GetTeamNumber(), -- Optional
}
local projectile = ProjectileManager:CreateTrackingProjectile(info)
ParticleManager:DestroyLinearProjectileSystem(projectile,false)
end
function OnKeine04SwordHit(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local ability = caster:FindAbilityByName("thtd_keine_04")
local damage = caster:THTD_GetAbilityPowerDamage(ability)
local DamageTable = {
ability = ability,
victim = target,
attacker = caster,
damage = damage,
damage_type = ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
function OnKeine04Jade(keys,distance)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local damage = caster:THTD_GetStarDamage() * (distance/100) * caster:GetAbilityValue("thtd_keine_04", "distance_damage")
local DamageTable = {
ability = caster:FindAbilityByName("thtd_keine_04"),
victim = target,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
function OnKeine04Mirror(keys,decrease_health,currentHealth)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
target:SetHealth(currentHealth + decrease_health * math.max(0, (1 - caster:GetAbilityValue("thtd_keine_04", "hp_percent"))))
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_keine/ability_keine_04_mirror.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, target:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
THTD_KEINE_04_SWORD = 1
THTD_KEINE_04_JADE = 2
THTD_KEINE_04_MIRROR = 3
function OnKeine04SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if caster.thtd_keine_04_change == nil then
caster.thtd_keine_04_change = THTD_KEINE_04_SWORD
end
if caster.thtd_keine_04_change == THTD_KEINE_04_SWORD then
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_keine_04_jade", duration=5, params={count=1}, color="#0ff"} )
caster.thtd_keine_04_change = THTD_KEINE_04_JADE
elseif caster.thtd_keine_04_change == THTD_KEINE_04_JADE then
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_keine_04_mirror", duration=5, params={count=1}, color="#0ff"} )
caster.thtd_keine_04_change = THTD_KEINE_04_MIRROR
elseif caster.thtd_keine_04_change == THTD_KEINE_04_MIRROR then
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_keine_04_sword", duration=5, params={count=1}, color="#0ff"} )
caster.thtd_keine_04_change = THTD_KEINE_04_SWORD
end
end

View File

@@ -0,0 +1,75 @@
function OnSpellStartKisume01(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local powerDamage = 0
local pv = caster:GetAbilityPowerValue(keys.ability:GetAbilityName())
if pv ~= nil then powerDamage = pv[1] end
local targets = THTD_FindUnitsInRadius(caster,caster:GetAbsOrigin(),keys.range)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * (1 + powerDamage)
for k,v in pairs(targets) do
local effectIndex = ParticleManager:CreateParticle("particles/units/heroes/heroes_underlord/abyssal_underlord_firestorm_wave.vpcf",PATTACH_CUSTOMORIGIN,caster)
ParticleManager:SetParticleControl(effectIndex, 0, v:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
end
function OnSpellStartKisume02(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
keys.ability:ApplyDataDrivenModifier(caster, target, "modifier_kisume_02_debuff", nil)
local powerCount = 0
local pv = caster:GetAbilityPowerValue(keys.ability:GetAbilityName())
if pv ~= nil then powerCount = pv[2] end
if powerCount > 0 then
local targets = THTD_FindUnitsInRadius(caster,target:GetAbsOrigin(), 600)
local addTargets = {}
local count = 0
for k,v in pairs(targets) do
if v ~= target then
table.insert(addTargets, v)
count = count + 1
end
if count >= powerCount then break end
end
targets = {}
for k,v in pairs(addTargets) do
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_kisume_02_debuff", nil)
end
end
end
function OnKisume02Think(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local powerHp = 0
local pv = caster:GetAbilityPowerValue(keys.ability:GetAbilityName())
if pv ~= nil then powerHp = pv[1] end
local DamageTable = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = caster:THTD_GetAbilityPowerDamage(keys.ability),
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
DamageTable.damage = DamageTable.damage + target:GetHealth() * (keys.damage_hp + powerHp) / 100
UnitDamageTarget(DamageTable)
end

View File

@@ -0,0 +1,104 @@
thtd_koakuma_01 = class({})
function thtd_koakuma_01:OnSpellStart()
local caster = self:GetCaster()
local target = self:GetCursorTarget()
local ExtraData = {
count=0
}
caster:EmitSound("Sound_THTD.thtd_koakuma_01")
self:Koakuma01PassToNextUnit(caster,caster:GetOrigin(),target,ExtraData)
end
function thtd_koakuma_01:Koakuma01PassToNextUnit(target,target_1,target_2,data)
local caster = self:GetCaster()
local info =
{
Target = target_2,
Source = target,
Ability = self,
EffectName = "particles/units/heroes/hero_dragon_knight/dragon_knight_elder_dragon_fire.vpcf",
iMoveSpeed = 1400,
vSourceLoc= target_1, -- Optional (HOW)
bDrawsOnMinimap = false, -- Optional
bDodgeable = true, -- Optional
bIsAttack = false, -- Optional
bVisibleToEnemies = true, -- Optional
bReplaceExisting = false, -- Optional
flExpireTime = GameRules:GetGameTime() + 10, -- Optional but recommended
bProvidesVision = true,
iVisionRadius = 400,
iVisionTeamNumber = caster:GetTeamNumber(),
ExtraData = {
count=data.count + 1
}
}
local projectile = ProjectileManager:CreateTrackingProjectile(info)
end
--------------------------------------------------------------------------------
function thtd_koakuma_01:OnProjectileHit_ExtraData( hTarget, vLocation, data )
local caster = self:GetCaster()
local target = hTarget
local damage = caster:THTD_GetAbilityPowerDamage(self)
local DamageTable = {
ability = self,
victim = target,
attacker = caster,
damage = damage,
damage_type = self:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
caster:EmitSound("Sound_THTD.thtd_koakuma_01.hit")
local range_damage = self:GetSpecialValueFor("range_damage")
if range_damage > 0 then
local effectIndex = ParticleManager:CreateParticle("particles/units/heroes/hero_ogre_magi/ogre_magi_fireblast.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, target:GetOrigin())
ParticleManager:SetParticleControl(effectIndex, 1, target:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
local enemies = THTD_FindUnitsInRadius(caster,vLocation,self:GetSpecialValueFor("range2"))
for k,v in pairs(enemies) do
local DamageTable = {
ability = self,
victim = v,
attacker = caster,
damage = damage * range_damage/100,
damage_type = self:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
end
local targets = THTD_FindUnitsInRadius(caster,vLocation,self:GetSpecialValueFor("range1"))
local max_count = self:GetSpecialValueFor("max_count")
for k,v in pairs(targets) do
if v~=nil and v~=target and data.count < max_count then
self:Koakuma01PassToNextUnit(target,vLocation,v,data)
break
end
end
return true
end
function OnCreatedKoakuma02Buff(keys)
local target = keys.target
target:AddMagicalResist(-keys.penetration)
end
function OnDestroyKoakuma02Buff(keys)
local target = keys.target
target:AddMagicalResist(keys.penetration)
end

View File

@@ -0,0 +1,87 @@
function OnKogasa01SpellStart(keys)
local caster = keys.caster
local targetPoint = keys.target_points[1]
local powerRange = 0
local powerDamage = 0
local powerSpecial = 0
local pv = caster:GetAbilityPowerValue(keys.ability:GetAbilityName())
if pv ~= nil then
powerRange = pv[1]
powerDamage = pv[2]
powerSpecial = pv[3]
end
caster:EmitSound("Sound_THTD.thtd_kogasa_01")
local special = 0
if caster:HasModifier("modifier_byakuren_03_buff") then
special = caster.thtd_byakuren_buff_kogasa + powerSpecial
end
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * (1 + powerDamage)
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.radius + powerRange)
for k,v in pairs(targets) do
if not v:HasModifier("modifier_kogasa_debuff") then
keys.ability:ApplyDataDrivenModifier(caster,v,"modifier_kogasa_debuff", {Duration = keys.duration_time})
end
if v.thtd_is_fearing ~= true then
v.thtd_is_fearing = true
local current_next_move_point = v.next_move_point
v.next_move_point = FirstPointList[v.thtd_player_index]
local time = keys.duration_time
v:SetContextThink(DoUniqueString("modifier_kogasa_debuff"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if not IsValidAlive(v) then
return nil
end
if time <= 0 or THTD_IsValid(caster) == false then
v.next_move_point = current_next_move_point
v.thtd_is_fearing = false
return nil
end
time = time - 0.1
return 0.1
end,
0)
end
local realDamage = damage
if special > 0 then
if v.thtd_kogasa_01_special ~= true then
v.thtd_kogasa_01_special = true
UnitDamageHpRemove(caster, v, special)
else
realDamage = realDamage * special
end
end
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = realDamage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/kogasa/ability_kogasa_01.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
function OnCreatedKogasa02Debuff(keys)
local target = keys.target
target:AddPhysicalArmor(-keys.armor)
end
function OnDestroyKogasa02Debuff(keys)
local target = keys.target
target:AddPhysicalArmor(keys.armor)
end

View File

@@ -0,0 +1,210 @@
function OnKoishi01Attack(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if caster.__koishi_lock ~= true then
caster.__koishi_lock = true
local targets = THTD_FindUnitsInRadius(caster,caster:GetOrigin(),keys.range)
for i=1,#targets do
local unit = targets[i]
if unit~=nil and unit:IsNull()==false and unit~=target and unit:IsAlive() then
caster:PerformAttack(unit,true,false,true,false,true,false,true)
if RollPercentage(keys.chance) then
local DamageTable = {
ability = keys.ability,
victim = unit,
attacker = caster,
damage = caster:THTD_GetAbilityPowerDamage(keys.ability),
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
local effectIndex = ParticleManager:CreateParticle("particles/units/heroes/hero_dark_willow/dark_willow_bramble.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControlEnt(effectIndex , 0, unit, 5, "follow_origin", Vector(0,0,0), true)
ParticleManager:DestroyParticleSystemTimeFalse(effectIndex,1.0)
end
end
end
caster.__koishi_lock = false
end
end
function OnKoishi02AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local modifer = caster:FindModifierByName("modifier_koishi_02_attack_speed") or keys.ability:ApplyDataDrivenModifier(caster, caster, "modifier_koishi_02_attack_speed", nil)
local max_count = keys.max_count
if caster:HasModifier("passive_koishi_04_attack") then
max_count = keys.count_bonus
end
if modifer:GetStackCount() < max_count then
modifer:IncrementStackCount()
end
modifer:SetDuration(keys.duration_time, false)
end
function OnKoishi03SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if target:THTD_IsTower() and target:HasModifier("modifier_koishi_03_buff") == false then
caster.thtd_last_cast_unit = target
local time = keys.duration_time
if caster:FindAbilityByName("thtd_koishi_01"):GetLevel() > 1 then
time = keys.combo_time
end
local bonus = keys.power_bonus
if target:GetUnitName() == "satori" then
if target:IsPower999() then
bonus = bonus * (keys.self_crit + 10)
else
bonus = bonus * keys.self_crit
end
elseif target:GetUnitName() == "koishi" then
bonus = bonus * keys.self_crit
end
target.koishi_03_power_bonus = bonus
keys.ability:ApplyDataDrivenModifier(caster,target,"modifier_koishi_03_buff", {Duration = time})
target:EmitSound("Hero_OgreMagi.Bloodlust.Target")
else
keys.ability:EndCooldown()
end
end
function OnCreatedKoishi03Buff(keys)
local target = keys.target
local bonus = target.koishi_03_power_bonus
target:THTD_AddBasePower(bonus, "thtd_koishi_03_bonus")
target:THTD_AddBaseAttack(bonus, "thtd_koishi_03_bonus")
end
function OnDestroyKoishi03Buff(keys)
local target = keys.target
target:THTD_AddBasePower("thtd_koishi_03_bonus")
target:THTD_AddBaseAttack("thtd_koishi_03_bonus")
end
function OnKoishi04SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if caster:HasModifier("passive_koishi_04_attack") then
keys.ability:EndCooldown()
keys.ability:StartCooldown(1.0)
caster:GiveMana(caster:GetRealManaCost(keys.ability))
return
end
local time = keys.duration_time
caster:StartGesture(ACT_DOTA_CAST_ABILITY_4)
caster:SetAttackCapability(DOTA_UNIT_CAP_MELEE_ATTACK)
keys.ability:ApplyDataDrivenModifier(caster, caster, "passive_koishi_04_attack",nil)
caster:EmitSound("Voice_Thdots_Koishi.AbilityKoishi041")
caster:EmitSound("Hero_VengefulSpirit.WaveOfTerror")
local effectIndex = ParticleManager:CreateParticle("particles/econ/events/fall_major_2015/teleport_end_fallmjr_2015_lvl2_black.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetOrigin())
ParticleManager:DestroyParticleSystemTimeFalse(effectIndex,0.8)
caster:SetContextThink(DoUniqueString("thtd_koishi04_buff_remove"),
function()
if GameRules:IsGamePaused() then return 0.03 end
caster:RemoveGesture(ACT_DOTA_CAST_ABILITY_4)
caster:SetContextThink(DoUniqueString("thtd_koishi04_buff_remove"),
function()
if GameRules:IsGamePaused() then return 0.1 end
caster:StartGesture(ACT_DOTA_CAST_ABILITY_4_END)
local effectIndex = ParticleManager:CreateParticle("particles/econ/events/fall_major_2015/teleport_end_fallmjr_2015_lvl2_black.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetOrigin())
ParticleManager:DestroyParticleSystemTimeFalse(effectIndex,0.25)
caster:EmitSound("Voice_Thdots_Koishi.AbilityKoishi042")
caster:EmitSound("Hero_VengefulSpirit.WaveOfTerror")
caster:SetContextThink(DoUniqueString("thtd_koishi04_buff_remove"),
function()
if GameRules:IsGamePaused() then return 0.1 end
caster:RemoveGesture(ACT_DOTA_CAST_ABILITY_4_END)
caster:SetAttackCapability(DOTA_UNIT_CAP_RANGED_ATTACK)
caster:RemoveModifierByName("passive_koishi_04_attack")
return nil
end,
0.25)
return nil
end,
time)
return nil
end,
0.8)
end
function OnKoishi04AttackStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local count = 3
caster:SetContextThink(DoUniqueString("thtd_koishi03_buff_remove"),
function()
if GameRules:IsGamePaused() then return 0.03 end
local num = RandomInt(1,6)
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_koishi/ability_koishi_04_attack_0"..num..".vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex , 0, caster:GetOrigin() - Vector(0,0,20))
ParticleManager:SetParticleControlForward(effectIndex , 0, caster:GetForwardVector()+Vector(0,0,num/12))
ParticleManager:SetParticleControlForward(effectIndex , 1, caster:GetForwardVector())
ParticleManager:DestroyParticleSystem(effectIndex,false)
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_koishi/ability_koishi_04_attack_landed.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex , 0, target:GetOrigin() + Vector(0,0,-260))
ParticleManager:SetParticleControl(effectIndex , 1, target:GetOrigin() + Vector(0,0,0))
ParticleManager:SetParticleControl(effectIndex , 2, target:GetOrigin() + Vector(0,0,0))
ParticleManager:SetParticleControl(effectIndex , 3, target:GetOrigin() + Vector(0,0,0))
ParticleManager:DestroyParticleSystem(effectIndex,false)
if count > 0 then
count = count - 1
return 0.1
else
return nil
end
end,
0.1)
end
function OnKoishi04Kill(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.unit
local effectIndex = ParticleManager:CreateParticle("particles/heroes/moluo/ability_moluo03_explosion.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex , 0, target:GetOrigin())
ParticleManager:SetParticleControl(effectIndex , 3, target:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
function OnCreatedKoishi04Buff(keys)
local target = keys.target
target:THTD_AddBasePower(keys.power_base, "thtd_koishi_04_bonus")
target:THTD_AddBaseAttack(keys.power_base, "thtd_koishi_04_bonus")
target:THTD_AddPowerPercentage(keys.power_up, "thtd_koishi_04_bonus")
target:THTD_AddAttackPercentage(keys.power_up, "thtd_koishi_04_bonus")
end
function OnDestroyKoishi04Buff(keys)
local target = keys.target
target:THTD_AddBasePower("thtd_koishi_04_bonus")
target:THTD_AddBaseAttack("thtd_koishi_04_bonus")
target:THTD_AddPowerPercentage("thtd_koishi_04_bonus")
target:THTD_AddAttackPercentage("thtd_koishi_04_bonus")
end

View File

@@ -0,0 +1,318 @@
function OnKokoro01SpellStart(keys)
local caster = keys.caster
local targets = THTD_FindUnitsInRadius(caster, caster:GetAbsOrigin(), keys.ability:GetCastRange())
if #targets == 0 then return end
for k,v in pairs(targets) do
local info =
{
Target = v,
Source = caster,
Ability = keys.ability,
EffectName = "particles/units/heroes/hero_arc_warden/arc_warden_wraith_prj.vpcf",
iMoveSpeed = 660,
vSourceLoc= caster:GetAbsOrigin(), -- Optional (HOW)
bDrawsOnMinimap = false, -- Optional
bDodgeable = true, -- Optional
bIsAttack = false, -- Optional
bVisibleToEnemies = true, -- Optional
bReplaceExisting = false, -- Optional
flExpireTime = GameRules:GetGameTime() + 10, -- Optional but recommended
bProvidesVision = true, -- Optional
iVisionRadius = 400, -- Optional
iVisionTeamNumber = caster:GetTeamNumber(), -- Optional
ExtraData = { }
}
local projectile = ProjectileManager:CreateTrackingProjectile(info)
ParticleManager:DestroyLinearProjectileSystem(projectile,false)
end
KokoroSetPvCrit(caster)
KokoroSetMust(caster, 1)
end
function OnProjectileHitUnitKokoro01(keys)
local caster = keys.caster
local target = keys.target
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
local crit1 = 1
local hasBuff1 = false
if caster:HasModifier("modifier_kokoro_04_buff_1") then
hasBuff1 = true
end
local damage_up_base = caster:GetAbilityValue("thtd_kokoro_04", "damage_up_base", true)
local damage_up_per = caster:GetAbilityValue("thtd_kokoro_04", "damage_up_per", true)
local damage_up_factor = 1
if caster:IsPower666() then
damage_up_factor = 4
end
local crit2 = KokoroGetPvCrit(caster)
if hasBuff1 then
crit1 = 1 + (damage_up_base + damage_up_per * (100 - target:GetHealthPercent())) * damage_up_factor
end
local DamageTable = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = damage * crit1 * crit2,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
function OnKokoro02SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
KokoroSetPvCrit(caster)
local stun_time = keys.stun_time
local crit1 = 1
local hasBuff1 = false
if caster:HasModifier("modifier_kokoro_04_buff_1") then
hasBuff1 = true
end
local damage_up_base = caster:GetAbilityValue("thtd_kokoro_04", "damage_up_base", true)
local damage_up_per = caster:GetAbilityValue("thtd_kokoro_04", "damage_up_per", true)
local damage_up_factor = 1
if caster:IsPower666() then
damage_up_factor = 4
end
local crit2 = KokoroGetPvCrit(caster)
local enemies = THTD_FindUnitsInRadius(caster, caster:GetAbsOrigin(), keys.ability:GetCastRange())
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
for k,v in pairs(enemies) do
local unit = CreateUnitByName(
"kokoro_jin_yin",
caster:GetAbsOrigin(),
false,
caster:GetOwner(),
caster:GetOwner(),
caster:GetTeam()
)
if unit ~= nil then
keys.ability:ApplyDataDrivenModifier(caster, unit, "modifier_kokoro_02_rooted", {})
-- unit:MoveToTargetToAttack(v)
-- 设置朝向
local vecForward = (v:GetOrigin() - caster:GetOrigin()):Normalized()
unit:SetForwardVector(vecForward)
-- local angles = VectorToAngles(vecForward)
-- unit:SetAngles(angles.x,angles.y,angles.z)
local scale = unit:GetModelScale()
local count = 0
unit:SetContextThink(
DoUniqueString("kokoro02_move"),
function ()
if GameRules:IsGamePaused() then return 0.03 end
if v==nil or v:IsNull() or v:IsAlive()==false then
unit:AddNoDraw()
unit:ForceKill(false)
return nil
end
if caster==nil or caster:IsNull() or caster:IsAlive()==false or caster:THTD_IsHidden() then
unit:AddNoDraw()
unit:ForceKill(false)
return nil
end
unit:SetModelScale(scale * (1 + 0.1 * count))
unit:MoveToTargetToAttack(v)
local vecMove=(unit:GetOrigin()-v:GetOrigin()):Normalized() * 100
unit:SetAbsOrigin(GetGroundPosition(unit:GetOrigin()-vecMove, unit))
if (unit:GetOrigin()-v:GetOrigin()):Length() < 50 then
if hasBuff1 then
crit1 = 1 + (damage_up_base + damage_up_per * (100 - v:GetHealthPercent())) * damage_up_factor
end
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage * crit1 * crit2,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
UnitStunTarget(caster,v,stun_time)
unit:AddNoDraw()
unit:ForceKill(false)
return nil
end
count = count + 1
return 0.05
end,
0.1)
end
end
KokoroSetMust(caster, 2)
end
function OnKokoro03SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local range = keys.ability:GetCastRange()
KokoroSetPvCrit(caster)
-- local effect = "particles/econ/items/mars/mars_fall20_immortal_shield/mars_fall20_immortal_shield_bash.vpcf"
local effect1 = "particles/econ/items/mars/mars_fall20_immortal_shield/mars_fall20_immortal_shield_bash_headmodel.vpcf"
local effect2 = "particles/units/heroes/hero_mars/mars_shield_bash_model.vpcf"
caster:EmitSound("Hero_Mars.Shield.Cast") --"Hero_Mars.Shield.Cast.Small"
local casterPoint = caster:GetOrigin()
local forward = caster:GetForwardVector()
local effectIndex = ParticleManager:CreateParticle(effect1, PATTACH_WORLDORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, casterPoint)
ParticleManager:SetParticleControlForward(effectIndex, 0, forward)
ParticleManager:ReleaseParticleIndex(effectIndex)
local effectIndex = ParticleManager:CreateParticle(effect2, PATTACH_WORLDORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, casterPoint)
ParticleManager:SetParticleControl(effectIndex, 1, Vector(range, 0, 0))
ParticleManager:SetParticleControlForward(effectIndex, 0, forward)
ParticleManager:ReleaseParticleIndex(effectIndex)
local rotate_angle = QAngle(0,45,0)
local rotate_forward = (RotatePosition(casterPoint + forward * 300, rotate_angle, casterPoint) - casterPoint):Normalized()
local effectIndex = ParticleManager:CreateParticle(effect1, PATTACH_WORLDORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, casterPoint)
ParticleManager:SetParticleControlForward(effectIndex, 0, rotate_forward)
ParticleManager:ReleaseParticleIndex(effectIndex)
local effectIndex = ParticleManager:CreateParticle(effect2, PATTACH_WORLDORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, casterPoint)
ParticleManager:SetParticleControl(effectIndex, 1, Vector(range, 0, 0))
ParticleManager:SetParticleControlForward(effectIndex, 0, rotate_forward)
ParticleManager:ReleaseParticleIndex(effectIndex)
local rotate_angle = QAngle(0,-45,0)
local rotate_forward = (RotatePosition(casterPoint + forward * 300, rotate_angle, casterPoint) - casterPoint):Normalized()
local effectIndex = ParticleManager:CreateParticle(effect1, PATTACH_WORLDORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, casterPoint)
ParticleManager:SetParticleControlForward(effectIndex, 0, rotate_forward)
ParticleManager:ReleaseParticleIndex(effectIndex)
local effectIndex = ParticleManager:CreateParticle(effect2, PATTACH_WORLDORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, casterPoint)
ParticleManager:SetParticleControl(effectIndex, 1, Vector(range, 0, 0))
ParticleManager:SetParticleControlForward(effectIndex, 0, rotate_forward)
ParticleManager:ReleaseParticleIndex(effectIndex)
local crit1 = 1
local hasBuff1 = false
if caster:HasModifier("modifier_kokoro_04_buff_1") then
hasBuff1 = true
end
local damage_up_base = caster:GetAbilityValue("thtd_kokoro_04", "damage_up_base", true)
local damage_up_per = caster:GetAbilityValue("thtd_kokoro_04", "damage_up_per", true)
local damage_up_factor = 1
if caster:IsPower666() then
damage_up_factor = 4
end
local crit2 = KokoroGetPvCrit(caster)
local targets = THTD_FindUnitsInRadius(caster, caster:GetAbsOrigin(), range)
local damage = caster:THTD_GetAttack() * keys.crit_mult
for k,v in pairs(targets) do
if hasBuff1 then
crit1 = 1 + (damage_up_base + damage_up_per * (100 - v:GetHealthPercent())) * damage_up_factor
end
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage * crit1 * crit2,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
KokoroSetMust(caster, 3)
end
function KokoroSetMust(caster, index)
local ability4 = caster:FindAbilityByName("thtd_kokoro_04")
if ability4:GetLevel() > 0 then
caster:RemoveModifierByName("modifier_kokoro_04_buff_1")
caster:RemoveModifierByName("modifier_kokoro_04_buff_2")
caster:RemoveModifierByName("modifier_kokoro_04_buff_3")
ability4:ApplyDataDrivenModifier(caster, caster, "modifier_kokoro_04_buff_"..index, nil)
end
end
function KokoroSetPvCrit(caster)
local powerDamageUp = 0
local pv = caster:GetAbilityPowerValue("thtd_kokoro_04")
if pv ~= nil then
powerDamageUp = pv[1]
end
caster.thtd_kokoro_pv_crit = 1 + powerDamageUp * 66/100
end
function KokoroGetPvCrit(caster)
return caster.thtd_kokoro_pv_crit or 1
end
function OnCreatedKokoro04Buff2(keys)
local target = keys.target
local bonus = keys.bonus
if target:IsPower666() then
bonus = bonus * 4
end
target:THTD_AddPowerPercentage(bonus, "thtd_kokoro_04_buff2_bonus")
target:THTD_AddAttackPercentage(bonus, "thtd_kokoro_04_buff2_bonus")
end
function OnDestroyKokoro04Buff2(keys)
local target = keys.target
target:THTD_AddPowerPercentage("thtd_kokoro_04_buff2_bonus")
target:THTD_AddAttackPercentage("thtd_kokoro_04_buff2_bonus")
end
function OnCreatedKokoro04Buff3(keys)
local target = keys.target
local bonus = keys.crit_damage
if target:IsPower666() then
bonus = bonus * 4
end
target:THTD_AddCritDamage(bonus, "thtd_kokoro_04_bonus")
end
function OnDestroyKokoro04Buff3(keys)
keys.target:THTD_AddCritDamage("thtd_kokoro_04_bonus")
end
function OnKokoro04Think(keys)
if keys.ability:GetLevel() < 1 then return end
local caster = keys.caster
local bonus = 0
if caster:IsPower999() then
bonus = 999
end
local targets = THTD_FindUnitsInRadius(caster, caster:GetAbsOrigin(), keys.ability:GetCastRange())
for k,v in pairs(targets) do
local hp = v:GetHealthPercent()
if hp > 70 then
bonus = bonus + hp - 70
end
if caster:IsPower999() then
bonus = bonus + (100 - hp) * 1
end
end
if caster.thtd_kokoro_04_power_bonus == bonus then return end
if caster.thtd_kokoro_04_power_bonus ~= nil then
caster:THTD_AddBasePower(-caster.thtd_kokoro_04_power_bonus)
caster:THTD_AddBaseAttack(-caster.thtd_kokoro_04_power_bonus)
end
caster:THTD_AddBasePower(bonus)
caster:THTD_AddBaseAttack(bonus)
caster.thtd_kokoro_04_power_bonus = bonus
end

View File

@@ -0,0 +1,292 @@
function OnAttackKomachi01(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local effectIndex = ParticleManager:CreateParticle("particles/heroes/komachi/ability_komachi_02.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex , 0, caster:GetOrigin())
ParticleManager:SetParticleControl(effectIndex , 1, caster:GetOrigin())
ParticleManager:SetParticleControlForward(effectIndex, 1, caster:GetForwardVector())
ParticleManager:DestroyParticleSystem(effectIndex, false)
end
function OnAttackLandedKomachi01(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local range = caster:Script_GetAttackRange()
local targets = THTD_FindUnitsInRadius(caster,caster:GetAbsOrigin(),range)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
end
function OnCreatedKomachi01Buff(keys)
-- 被动需要加延时确保在初始化之后
keys.target:SetContextThink(DoUniqueString("dota_timer"),
function()
if GameRules:IsGamePaused() then return 0.1 end
keys.target:THTD_AddCritChance(keys.chance, "thtd_komachi_01_chance")
return nil
end,
0.3)
end
function OnThinkKomachi01(keys)
local caster = keys.caster
local range = caster:Script_GetAttackRange()
local targets = THTD_FindUnitsInRadius(caster,caster:GetAbsOrigin(),range)
local crit = 0
local chance = 0
for k,v in pairs(targets) do
local lostHp = 100 - v:GetHealthPercent()
crit = crit + math.floor(lostHp/4) * keys.crit_bonus
end
caster:THTD_AddCritDamage(crit, "thtd_komachi_01_bonus")
end
function OnSpellStartKomachi02(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
local effectIndex = ParticleManager:CreateParticle("particles/units/heroes/hero_dark_seer/dark_seer_vacuum.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
ParticleManager:SetParticleControl(effectIndex, 1, Vector(keys.radius,0, 0))
caster:EmitSound("Hero_Dark_Seer.Vacuum")
local time = math.floor(keys.duration_time * 100 + 0.5) / 100
local tick = 0.03
caster:SetContextThink(DoUniqueString("thtd_komachi_02"),
function()
if THTD_IsValid(caster) == false then
ParticleManager:DestroyParticleSystem(effectIndex, true)
return nil
end
if time < 0 then
ParticleManager:DestroyParticleSystem(effectIndex, true)
caster:StopSound("Hero_Dark_Seer.Vacuum")
targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.radius)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
return nil
end
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.radius)
for k, v in pairs(targets) do
local distance = (v:GetAbsOrigin() - targetPoint):Length2D()
local in_pull = 700
local new_pos = GetGroundPosition(v:GetAbsOrigin(), v)
if distance > 20 then
local direction = (targetPoint - new_pos):Normalized()
direction.z = 0.0
new_pos = new_pos + direction * in_pull * tick
end
v:SetOrigin(new_pos)
end
time = time - tick
return tick
end,
0)
end
function OnSpellStartKomachi03(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetUnit = keys.target
local targets = {}
local count = 0
local modifierName = "modifier_komachi_03_debuff"
if not targetUnit:HasModifier(modifierName) then
table.insert(targets, targetUnit)
count = count + 1
end
if count < keys.max_count then
local rangeTargets = THTD_FindUnitsInRadius(caster,targetUnit:GetAbsOrigin(),1000)
for k,v in pairs(rangeTargets) do
if not v:HasModifier(modifierName) then
table.insert(targets, v)
count = count + 1
if count >= keys.max_count then
break
end
end
end
end
if #targets == 0 then
keys.ability:EndCooldown()
return
end
for _,target in pairs(targets) do
keys.ability:ApplyDataDrivenModifier(caster, target, modifierName, {})
end
end
function OnCreatedKomachi03Debuff(keys)
keys.target:AddDamageIncomingAll(keys.damage_up, "thtd_komachi_02_damage_up")
end
function OnDestroyKomachi03Debuff(keys)
local caster = keys.caster
local target = keys.target
target:AddDamageIncomingAll("thtd_komachi_02_damage_up")
local effectIndex = ParticleManager:CreateParticle("particles/heroes/komachi/ability_komachi_03_explosion_2.vpcf", PATTACH_CUSTOMORIGIN, target)
ParticleManager:SetParticleControl(effectIndex , 0, target:GetOrigin() + Vector(0,0,128))
ParticleManager:DestroyParticleSystem(effectIndex, false)
end
function OnSpellStartKomachi04(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local vecCaster = caster:GetOrigin()
if target:HasModifier("modifier_komachi_04") then
keys.ability:EndCooldown()
return
end
keys.ability:ApplyDataDrivenModifier(caster,caster,"modifier_komachi_04",{Duration = 2.0})
keys.ability:ApplyDataDrivenModifier(caster,target,"modifier_komachi_04",{Duration = 2.0})
target.komachi_04_damage_lock = true
local rad = GetRadBetweenTwoVec2D(caster:GetOrigin(),target:GetOrigin())
local tarForward = Vector(math.cos(rad),math.sin(rad),0)
target:SetForwardVector(tarForward)
-- 渐隐效果
-- local effectIndex_start = ParticleManager:CreateParticle("particles/heroes/komachi/ability_komachi_04_start.vpcf", PATTACH_CUSTOMORIGIN, nil)
-- ParticleManager:SetParticleControl(effectIndex_start, 0, vecCaster)
-- ParticleManager:SetParticleControlForward(effectIndex_start, 0, tarForward)
-- caster:SetContextThink(DoUniqueString("OnKomachi04SpellStart"),
-- function ()
-- if GameRules:IsGamePaused() then return 0.03 end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/komachi/ability_komachi_04_blink.vpcf", PATTACH_CUSTOMORIGIN, target)
ParticleManager:SetParticleControl(effectIndex, 0, target:GetOrigin()-tarForward*250)
ParticleManager:SetParticleControlForward(effectIndex, 0, tarForward)
caster:SetOrigin(target:GetOrigin()-tarForward*150)
caster:SetForwardVector(tarForward)
caster:StartGesture(ACT_DOTA_CAST_ABILITY_4)
-- return nil
-- end,
-- 2.0)
local time = 2.0
caster:SetContextThink(DoUniqueString("OnKomachi04SpellStart_stage_2"),
function ()
if GameRules:IsGamePaused() then return 0.1 end
if not THTD_IsValid(caster) then
target.komachi_04_damage_lock = false
target:RemoveModifierByName("modifier_komachi_04")
ParticleManager:DestroyParticleSystem(effectIndex, true)
if caster ~= nil and caster:IsNull() == false then
caster:RemoveModifierByName("modifier_komachi_04")
end
return nil
end
if not THTD_IsValid(target) then
caster:SetOrigin(vecCaster)
caster:RemoveModifierByName("modifier_komachi_04")
if target ~= nil and target:IsNull() == false then
target:RemoveModifierByName("modifier_komachi_04")
end
caster:EmitSound("Hero_Axe.Culling_Blade_Success")
local bonusTime = math.floor(keys.duration_time * 100 + 0.5) / 100
local modifier = caster:FindModifierByName("modifier_komachi_04_buff")
if modifier == nil then
keys.ability:ApplyDataDrivenModifier(caster,caster,"modifier_komachi_04_buff",{Duration=bonusTime})
else
modifier:SetDuration(bonusTime, false)
end
if keys.bonus_power > 0 then
local skipedCount = 0
if SpawnSystem.ReachToWave ~= nil then
if caster.skiped_wave == nil then
caster.skiped_wave = SpawnSystem.ReachToWave + 50 - SpawnSystem.CurWave - 1
end
elseif caster.skiped_wave ~= nil then
skipedCount = caster.skiped_wave * 2
caster.skiped_wave = nil
end
modifier = caster:FindModifierByName("modifier_komachi_04_kill_power_bonus")
if modifier == nil then
keys.ability:ApplyDataDrivenModifier(caster,caster,"modifier_komachi_04_kill_power_bonus",{}):SetStackCount(1)
caster:THTD_AddBasePower(keys.bonus_power)
elseif modifier:GetStackCount() < 999 then
local addCount = math.min(999 - modifier:GetStackCount(), 1 + skipedCount)
modifier:SetStackCount(modifier:GetStackCount() + addCount)
caster:THTD_AddBasePower(keys.bonus_power * addCount)
end
end
return nil
end
if time <= 0 then
target.komachi_04_damage_lock = false
caster:RemoveModifierByName("modifier_komachi_04")
target:RemoveModifierByName("modifier_komachi_04")
local effectIndex_end = ParticleManager:CreateParticle("particles/heroes/komachi/ability_komachi_04_scythe.vpcf", PATTACH_CUSTOMORIGIN, target)
ParticleManager:SetParticleControl(effectIndex_end, 0, target:GetOrigin())
ParticleManager:SetParticleControl(effectIndex_end, 1, target:GetOrigin())
caster:SetOrigin(vecCaster)
if target:GetHealthPercent() <= keys.hp_kill then
caster:NpcKill(target)
else
caster:AbilityKill(target, keys.ability)
end
time = -1
return 0.1
end
if time <= -1 then
return nil
end
time = time - 0.1
return 0.1
end,
0)
end
function OnCreatedKomachi04Buff(keys)
local target = keys.target
target:THTD_AddAttackSpeed(keys.attack_speed, "thtd_komachi_04_bonus")
target:AddDamageOutgoingAll(keys.damage_up, "thtd_komachi_04_bonus")
end
function OnDestroyKomachi04Buff(keys)
local target = keys.target
target:THTD_AddAttackSpeed("thtd_komachi_04_bonus")
target:AddDamageOutgoingAll("thtd_komachi_04_bonus")
end

View File

@@ -0,0 +1,304 @@
function OnSpellStartKyouko01(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.ability:GetCursorPosition()
local effects = {
"particles/units/heroes/hero_queenofpain/queen_sonic_wave.vpcf",
"particles/econ/items/queen_of_pain/qop_arcana/qop_arcana_sonic_wave.vpcf",
"particles/econ/items/queen_of_pain/qop_arcana/qop_arcana_sonic_wave_v2.vpcf",
}
local powerDamageUp = 0
local pv = caster:GetAbilityPowerValue("thtd_kyouko_01")
if pv ~= nil then
powerDamageUp = pv[1]
end
caster.thtd_kyouko_01_damage_up = keys.damage_up + powerDamageUp
if caster:IsPower999() then
if caster.kyouko_power999_bonus ~= true then
caster:THTD_AddCritChance(75)
caster:THTD_AddCritDamage(500)
caster.kyouko_power999_bonus = true
end
else
if caster.kyouko_power999_bonus == true then
caster:THTD_AddCritChance(-75)
caster:THTD_AddCritDamage(-500)
caster.kyouko_power999_bonus = nil
end
end
local direction = (targetPoint - caster:GetAbsOrigin()):Normalized()
direction.z = 0
if caster:IsPower666() then
local count = 3
caster:SetContextThink(DoUniqueString("dota_timer"),
function()
if GameRules:IsGamePaused() then return 0.1 end
count = count - 1
if count < 0 then
return nil
end
local info =
{
Ability = keys.ability,
EffectName = effects[#effects - count],
vSpawnOrigin = caster:GetAbsOrigin(),
fDistance = keys.distance,
fStartRadius = keys.starting_aoe,
fEndRadius = keys.final_aoe,
Source = caster,
iSourceAttachment = "mouth",
bHasFrontalCone = false,
bReplaceExisting = false,
iUnitTargetTeam = DOTA_UNIT_TARGET_TEAM_ENEMY,
iUnitTargetFlags = DOTA_UNIT_TARGET_FLAG_NONE,
iUnitTargetType = DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC,
fExpireTime = GameRules:GetGameTime() + 10.0,
bDeleteOnHit = false,
vVelocity = direction * keys.speed,
bProvidesVision = false,
ExtraData = {}
}
ProjectileManager:CreateLinearProjectile(info)
return 1.0
end,
0)
else
local info =
{
Ability = keys.ability,
EffectName = effects[RandomInt(1, #effects)],
vSpawnOrigin = caster:GetAbsOrigin(),
fDistance = keys.distance,
fStartRadius = keys.starting_aoe,
fEndRadius = keys.final_aoe,
Source = caster,
iSourceAttachment = "mouth",
bHasFrontalCone = false,
bReplaceExisting = false,
iUnitTargetTeam = DOTA_UNIT_TARGET_TEAM_ENEMY,
iUnitTargetFlags = DOTA_UNIT_TARGET_FLAG_NONE,
iUnitTargetType = DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC,
fExpireTime = GameRules:GetGameTime() + 10.0,
bDeleteOnHit = false,
vVelocity = direction * keys.speed,
bProvidesVision = false,
ExtraData = {}
}
ProjectileManager:CreateLinearProjectile(info)
end
end
function OnProjectileHitUnitKyouko01(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * (1 + (caster.thtd_byakuren_buff_kyouko or 0)/100)
local crit = 1.0
local modifier = target:FindModifierByName("modifier_thtd_kyouko_01_debuff")
if modifier ~= nil then
local count = modifier:GetStackCount()
crit = crit + count * caster.thtd_kyouko_01_damage_up/100
modifier:SetStackCount(math.min(999, count+1))
else
keys.ability:ApplyDataDrivenModifier(caster, target, "modifier_thtd_kyouko_01_debuff", nil):SetStackCount(1)
end
local DamageTable = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = damage * crit,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
function OnSpellStartKyouko02(keys)
local caster = keys.caster
if caster:IsPower999() then
if caster.kyouko_power999_bonus ~= true then
caster:THTD_AddCritChance(75)
caster:THTD_AddCritDamage(500)
caster.kyouko_power999_bonus = true
end
else
if caster.kyouko_power999_bonus == true then
caster:THTD_AddCritChance(-75)
caster:THTD_AddCritDamage(-500)
caster.kyouko_power999_bonus = nil
end
end
caster.thtd_kyouko_02_first = true
if caster:IsPower666() then
local count = 3
caster:SetContextThink(DoUniqueString("dota_timer"),
function()
if GameRules:IsGamePaused() then return 0.1 end
if count == 2 then caster.thtd_kyouko_02_first = false end
count = count - 1
if count < 0 then
return nil
end
OnSpellStartKyouko02Work(keys)
return 0.9
end,
0)
else
OnSpellStartKyouko02Work(keys)
end
end
function OnSpellStartKyouko02Work(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
local effects = {
[1] = {
["start"] = "particles/econ/items/earthshaker/earthshaker_arcana/earthshaker_arcana_echoslam_start.vpcf",
["ground"] = "particles/econ/items/earthshaker/earthshaker_arcana/earthshaker_arcana_echoslam_ground.vpcf",
["proj"] = "particles/econ/items/earthshaker/earthshaker_arcana/earthshaker_arcana_echoslam_proj.vpcf",
},
[2] = {
["start"] = "particles/econ/items/earthshaker/earthshaker_arcana/earthshaker_arcana_echoslam_start_v2.vpcf",
["ground"] = "particles/econ/items/earthshaker/earthshaker_arcana/earthshaker_arcana_echoslam_ground_v2.vpcf",
["proj"] = "particles/econ/items/earthshaker/earthshaker_arcana/earthshaker_arcana_echoslam_proj_v2.vpcf",
},
}
local effectTable = effects[RandomInt(1,2)]
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.range)
-- if #targets > 0 then
-- EmitSoundOnLocationWithCaster(targetPoint, "Hero_EarthShaker.EchoSlam", caster)
-- else
-- EmitSoundOnLocationWithCaster(targetPoint, "Hero_EarthShaker.EchoSlamSmall", caster)
-- end
-- caster:SetContextThink(DoUniqueString("OnSpellStartKyouko02"),
-- function()
-- if #targets == 2 then
-- local random_response = RandomInt(1, 4)
-- if random_response >= 3 then random_response = random_response + 1 end
-- EmitSoundOnLocationWithCaster(targetPoint, "earthshaker_erth_ability_echo_0"..random_response, caster)
-- elseif #targets >= 3 then
-- EmitSoundOnLocationWithCaster(targetPoint, "earthshaker_erth_ability_echo_03", caster)
-- elseif #targets == 0 then
-- EmitSoundOnLocationWithCaster(targetPoint, "earthshaker_erth_ability_echo_0"..(RandomInt(6, 7)), caster)
-- end
-- return nil
-- end,
-- 0.5)
local powerDamage = 0
local pv = caster:GetAbilityPowerValue("thtd_kyouko_02")
if pv ~= nil then
powerDamage = pv[1]
end
caster.thtd_kyouko_02_damage = (keys.power_damage + powerDamage) * caster:THTD_GetStarDamage()
local effect_counter = 0
local count = 0
for _, enemy in pairs(targets) do
count = count + 1
if count%5 == 0 then
if effect_counter < 5 then
effect_counter = effect_counter + 1
end
caster:SetContextThink(DoUniqueString("OnSpellStartKyouko02"),
function()
local echo_slam_death_pfx = ParticleManager:CreateParticle(effectTable["ground"], PATTACH_ABSORIGIN, enemy)
ParticleManager:SetParticleControl(echo_slam_death_pfx, 6, Vector(math.min(effect_counter, 1), math.min(effect_counter, 1), math.min(effect_counter, 1)))
ParticleManager:SetParticleControl(echo_slam_death_pfx, 10, Vector(keys.duration_time + 1, 0, 0)) -- earth particle duration
ParticleManager:ReleaseParticleIndex(echo_slam_death_pfx)
return nil
end,
0.1)
end
local crit = 1.0
local modifier = enemy:FindModifierByName("modifier_thtd_kyouko_01_debuff")
if modifier ~= nil then
crit = crit + modifier:GetStackCount() * caster.thtd_kyouko_01_damage_up/100
end
if caster.thtd_kyouko_02_first == true then UnitStunTarget(caster,enemy,keys.duration_time) end
local DamageTable = {
ability = keys.ability,
victim = enemy,
attacker = caster,
damage = caster.thtd_kyouko_02_damage * crit,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
if enemy.is_random_boss == true then
local pfx_screen = ParticleManager:CreateParticleForPlayer("particles/econ/items/earthshaker/earthshaker_arcana/earthshaker_arcana_aftershock_screen.vpcf", PATTACH_ABSORIGIN_FOLLOW, enemy, caster:GetPlayerOwner())
ParticleManager:ReleaseParticleIndex(pfx_screen)
end
local echo_enemies = THTD_FindUnitsInRadius(caster,enemy:GetAbsOrigin(),keys.range)
for _, echo_enemy in pairs(echo_enemies) do
if echo_enemy ~= enemy then
-- echo_enemy:EmitSound("Hero_EarthShaker.EchoSlamEcho")
ProjectileManager:CreateTrackingProjectile(
{
Target = echo_enemy,
Source = enemy,
Ability = keys.ability,
EffectName = effectTable["proj"],
iMoveSpeed = 1100,
vSourceLoc = enemy:GetAbsOrigin(),
bDrawsOnMinimap = false,
bDodgeable = false,
bIsAttack = false,
bVisibleToEnemies = true,
bReplaceExisting = false,
flExpireTime = GameRules:GetGameTime() + 10.0,
bProvidesVision = false,
ExtraData = {}
})
end
end
end
local echo_slam_particle = ParticleManager:CreateParticle(effectTable["start"], PATTACH_ABSORIGIN, caster)
ParticleManager:SetParticleControl(echo_slam_particle, 0, targetPoint)
ParticleManager:SetParticleControl(echo_slam_particle, 10, Vector(keys.duration_time + 1, 0, 0))
ParticleManager:SetParticleControl(echo_slam_particle, 11, Vector(math.min(#targets, 1), math.min(#targets, 1), 0 ))
ParticleManager:ReleaseParticleIndex(echo_slam_particle)
end
function OnProjectileHitUnitKyouko02(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if caster.thtd_kyouko_02_first == true then UnitStunTarget(caster,target,keys.duration_time) end
local crit = 1.0
local modifier = target:FindModifierByName("modifier_thtd_kyouko_01_debuff")
if modifier ~= nil then
crit = crit + modifier:GetStackCount() * caster.thtd_kyouko_01_damage_up/100
end
local DamageTable = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = caster.thtd_kyouko_02_damage * crit,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end

View File

@@ -0,0 +1,72 @@
function OnLetty01SpellStart(keys)
local caster = keys.caster
local targetPoint = keys.target_points[1]
local powerCount = 0
local powerDamage = 0
local pv = caster:GetAbilityPowerValue(keys.ability:GetAbilityName())
if pv ~= nil then
powerCount = pv[1]
powerDamage = pv[2]
end
local maxCount = keys.max_count + powerCount
local count_effect = maxCount
local count = maxCount
keys.ability:StartCooldown(maxCount - 1)
caster:SetContextThink(DoUniqueString("thtd_letty01_spell_start_effect"),
function()
for i=1,20 do
local effectIndex = ParticleManager:CreateParticle("particles/heroes/letty/ability_letty_01.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint + Vector(math.cos(math.pi/4*i),math.sin(math.pi/4*i),0)*200 + RandomVector(100))
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
count_effect = count_effect - 1
caster:EmitSound("Sound_THTD.thtd_letty_01")
if count_effect > 0 then
return 1.0
else
return nil
end
end,
0)
caster:SetContextThink(DoUniqueString("thtd_letty01_spell_start"),
function()
if GameRules:IsGamePaused() then return 0.03 end
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.radius)
local damage = (caster:THTD_GetAbilityPowerDamage(keys.ability) + powerDamage * caster:THTD_GetStarDamage()) * 2^(maxCount - count)
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
count = count - 1
if count > 0 then
return 1.0
else
return nil
end
end,
0)
end
function OnCreatedLetty02Buff(keys)
local target = keys.target
target:AddMagicalResist(-keys.magic_armor)
end
function OnDestroyLetty02Buff(keys)
local target = keys.target
target:AddMagicalResist(keys.magic_armor)
end

View File

@@ -0,0 +1,117 @@
function OnLily01SpellStart(keys)
local caster = keys.caster
local ability = keys.ability
local targetPoint = keys.target_points[1]
if caster:GetMaxMana() ~= (caster.lily_max_mana or 100) then
caster:SetMaxMana(caster.lily_max_mana or 100)
end
if SpawnSystem.IsUnLimited == false and GameRules:GetCustomGameDifficulty() < FUNNY_MODE then
local targets =
FindUnitsInRadius(
caster:GetTeamNumber(),
targetPoint,
nil,
keys.radius,
ability:GetAbilityTargetTeam(),
ability:GetAbilityTargetType(),
ability:GetAbilityTargetFlags(),
FIND_CLOSEST,
false
)
local exp = caster:THTD_GetPower() * keys.power_factor
for k,v in pairs(targets) do
if v ~= nil and v:IsNull() == false and v:THTD_IsTower() and v ~= caster and v:GetOwner() == caster:GetOwner() and v:THTD_GetLevel() < THTD_MAX_LEVEL then
v:THTD_AddExp(exp)
end
end
end
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.radius)
local damage = caster:THTD_GetAbilityPowerDamage(ability)
local maxDamage = caster:GetKillDamage()
for k,v in pairs(targets) do
local DamageTable = {
ability = ability,
victim = v,
attacker = caster,
damage = math.min(maxDamage, damage + v:GetHealth() * keys.hp_damage/100),
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/lily/ability_lily_01_a.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
function OnLily01EffectThink(keys)
local caster = keys.caster
local ability = keys.ability
if SpawnSystem.IsUnLimited and caster.is_unlimited_mana_buff ~= true then
caster.is_unlimited_mana_buff = true
caster:AddManaCostReducePercent(keys.mana_down, "thtd_lily_01_unlimited_mana_buff")
caster.lily_max_mana = 100 - caster:GetManaCostReducePercent()
end
if caster:GetMaxMana() ~= (caster.lily_max_mana or 100) then
caster:SetMaxMana(caster.lily_max_mana or 100)
end
if ability:IsFullyCastable() then
if caster.thtd_lily_01_effectIndex == nil then
caster.thtd_lily_01_effectIndex = ParticleManager:CreateParticle("particles/heroes/lily/ability_lily_01_ready.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControlEnt(caster.thtd_lily_01_effectIndex , 0, caster, 5, "follow_origin", Vector(0,0,0), true)
end
elseif caster.thtd_lily_01_effectIndex ~= nil then
ParticleManager:DestroyParticleSystem(caster.thtd_lily_01_effectIndex,true)
caster.thtd_lily_01_effectIndex = nil
end
end
function OnLily02SpellStart(keys)
local caster = keys.caster
if caster:GetMaxMana() ~= (caster.lily_max_mana or 100) then
caster:SetMaxMana(caster.lily_max_mana or 100)
end
local powerRange = 0
local pv = caster:GetAbilityPowerValue("thtd_lily_02")
if pv ~= nil then
powerRange = pv[1]
end
local range = powerRange + keys.radius
local targets = THTD_FindFriendlyUnitsInRadius(caster,caster:GetAbsOrigin(),range)
for k,v in pairs(targets) do
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_lily_02_buff", nil)
end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/lily/ability_lily_02.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetOrigin())
ParticleManager:SetParticleControl(effectIndex, 1, Vector(range, range, range))
ParticleManager:DestroyParticleSystemTime(effectIndex,keys.duration)
end
function OnCreatedLily02Buff(keys)
local factor = 1
if keys.target:GetUnitName() == "lily" then
local date = string.sub(GameRules.GameData.server_time,6,10)
if date >= "02-05" and date <= "05-05" then
factor = keys.self_crit
end
end
keys.target:AddDamageOutgoingAll(keys.damage_up * factor, "thtd_lily_02_damage_up")
end
function OnDestroyLily02Buff(keys)
keys.target:AddDamageOutgoingAll("thtd_lily_02_damage_up")
end

View File

@@ -0,0 +1,169 @@
function OnLuna01Attack(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local targetPoint = target:GetOrigin()
local attackedTargets = {}
OnLuna01Damage(keys,target,1)
table.insert(attackedTargets, target)
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.range)
local count = 1
for k,v in pairs(targets) do
if count > keys.max_count then
break
end
if THTD_IsValid(v) and v ~= target then
OnLuna01Damage(keys,v,1 + keys.damage_up/100)
table.insert(attackedTargets, v)
count = count + 1
end
end
local fairyArea = nil
local hero = caster:GetOwner()
if hero~=nil and hero:IsNull()==false then
local fairyList = GetHeroFairyList(hero)
for k,v in pairs(fairyList) do
if v.luna == caster then
fairyArea = v
break
end
end
end
if fairyArea ~= nil then
local pos1 = fairyArea.sunny:GetAbsOrigin()
local pos2 = fairyArea.star:GetAbsOrigin()
local pos3 = fairyArea.luna:GetAbsOrigin()
local center, radius = GetCircleCenterAndRadius(pos1,pos2,pos3)
local targetsTotal = {}
local fairyTargets = THTD_FindUnitsInRadius(caster,center,radius)
for _,v in pairs(fairyTargets) do
if v~=nil and v:IsNull()==false and v:IsAlive() and IsUnitInFairy(fairyArea,v) then
targetsTotal[v:GetEntityIndex()] = v
end
end
for k,v in pairs(targetsTotal) do
local isExist = false
for k2,v2 in pairs(attackedTargets) do
if v2 == v then
isExist = true
break
end
end
if isExist == false and THTD_IsValid(v) then
OnLuna01Damage(keys,v,1 + keys.damage_up/100)
end
end
end
end
function OnLuna01Damage(keys,target,percentage)
local caster = EntIndexToHScript(keys.caster_entindex)
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_luna/ability_luna_01.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, target:GetOrigin())
ParticleManager:SetParticleControl(effectIndex, 1, target:GetOrigin())
ParticleManager:SetParticleControl(effectIndex, 2, target:GetOrigin())
ParticleManager:SetParticleControl(effectIndex, 5, target:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * percentage
local DamageTable = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
function OnLuna02SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
local foward = (targetPoint - caster:GetAbsOrigin()):Normalized()
local targetsTotal = {}
local targets =
FindUnitsInLine(
caster:GetTeamNumber(),
caster:GetOrigin(),
caster:GetOrigin() + foward*1000,
nil,
200,
keys.ability:GetAbilityTargetTeam(),
keys.ability:GetAbilityTargetType(),
keys.ability:GetAbilityTargetFlags()
)
local fairyArea = nil
local hero = caster:GetOwner()
if hero~=nil and hero:IsNull()==false then
local fairyList = GetHeroFairyList(hero)
for k,v in pairs(fairyList) do
if v.luna == caster then
fairyArea = v
break
end
end
end
if fairyArea ~= nil then
local pos1 = fairyArea.sunny:GetAbsOrigin()
local pos2 = fairyArea.star:GetAbsOrigin()
local pos3 = fairyArea.luna:GetAbsOrigin()
local center, radius = GetCircleCenterAndRadius(pos1,pos2,pos3)
local fairyTargets = THTD_FindUnitsInRadius(caster,center,radius)
for _,v in pairs(fairyTargets) do
if v~=nil and v:IsNull()==false and v:IsAlive() and IsUnitInFairy(fairyArea,v) then
targetsTotal[v:GetEntityIndex()] = v
end
end
end
for k,v in pairs(targets) do
targetsTotal[v:GetEntityIndex()] = v
end
targets = {}
if caster:HasModifier("modifier_luna_02_buff") then
caster:RemoveModifierByName("modifier_luna_02_buff")
end
caster.luna_02_power_bonus = keys.bonus_power * table.count(targetsTotal)
keys.ability:ApplyDataDrivenModifier(caster,caster, "modifier_luna_02_buff", {Duration = keys.duration_time})
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
for k,v in pairs(targetsTotal) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_luna/ability_luna_02_laser.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetOrigin()+Vector(0,0,128))
ParticleManager:SetParticleControl(effectIndex, 1, caster:GetOrigin() + foward*1000 + Vector(0,0,128))
ParticleManager:SetParticleControl(effectIndex, 3, caster:GetOrigin() + foward*1000 + Vector(0,0,128))
ParticleManager:SetParticleControl(effectIndex, 9, caster:GetOrigin() + Vector(0,0,128))
ParticleManager:DestroyParticleSystemTime(effectIndex,2.0)
end
function OnCreatedLuna02Buff(keys)
local target = keys.target
local bonus = target.luna_02_power_bonus
target:THTD_AddPowerPercentage(bonus, "thtd_luna_02_bonus")
target:THTD_AddAttackPercentage(bonus, "thtd_luna_02_bonus")
end
function OnDestroyLuna02Buff(keys)
local target = keys.target
target:THTD_AddPowerPercentage("thtd_luna_02_bonus")
target:THTD_AddAttackPercentage("thtd_luna_02_bonus")
end

View File

@@ -0,0 +1,105 @@
function OnLunasa01SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
caster:EmitSound("Sound_THTD.thtd_lunasa_01")
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.radius)
for k,v in pairs(targets) do
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_lunasa_01_debuff", nil)
UpdatePrismriverComboName(caster,v)
local comboName = GetPrismriverComboName(v)
if comboName == "lyricamerlinlunasa" then
OnLyricaMerlinLunasa(keys,caster,v)
ResetPrismriverComboName(v)
elseif comboName == "merlinlyricalunasa" then
OnMerlinLyricaLunasa(keys,caster,v)
ResetPrismriverComboName(v)
end
local time = keys.duration_time
v:SetContextThink(DoUniqueString("thtd_lunasa01_debuff"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if time <= 0 then return nil end
if v==nil or v:IsNull() or v:IsAlive()==false then return nil end
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * 0.5
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
time = time - 0.5
return 0.5
end,
0)
end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/lunasa/ability_lunasa_01.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
function OnLunasa02AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if keys.ability:GetLevel() < 1 then return end
local abilty_01 = caster:FindAbilityByName("thtd_lunasa_01")
abilty_01:ApplyDataDrivenModifier(caster, target, "modifier_lunasa_01_debuff", nil)
local time = abilty_01:GetSpecialValueFor("duration_time")
target:SetContextThink(DoUniqueString("thtd_lunasa02_debuff"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if time <= 0 then return nil end
if target==nil or target:IsNull() or target:IsAlive()==false then return nil end
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * 0.5
local DamageTable = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
time = time - 0.5
return 0.5
end,
0)
UpdatePrismriverComboName(caster,target)
end
function OnLyricaMerlinLunasa(keys,caster,target)
local modifier = target:FindModifierByName("modifier_lunasa_01_pause")
if modifier ~= nil then
modifier:SetDuration(keys.stun_time1,false)
else
keys.ability:ApplyDataDrivenModifier(caster,target,"modifier_lunasa_01_pause",{Duration = keys.stun_time1})
end
end
function OnMerlinLyricaLunasa(keys,caster,target)
local targets = THTD_FindUnitsInRadius(caster,target:GetOrigin(),keys.radius)
for k,v in pairs(targets) do
local modifier = v:FindModifierByName("modifier_lunasa_01_pause")
if modifier ~= nil then
modifier:SetDuration(keys.stun_time2,false)
else
keys.ability:ApplyDataDrivenModifier(caster,v,"modifier_lunasa_01_pause",{Duration = keys.stun_time2})
end
end
end

View File

@@ -0,0 +1,95 @@
function OnLyrica01SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
local isEnabled = false
if caster:FindAbilityByName("thtd_lyrica_02"):GetLevel() >= 1 then
isEnabled = true
end
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.radius)
for k,v in pairs(targets) do
UpdatePrismriverComboName(caster,v)
if isEnabled then
if v:HasModifier("modifier_lunasa_01_debuff") then
local effectIndex = ParticleManager:CreateParticle("particles/heroes/lunasa/ability_lunasa_music_buff.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, v:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
if v:HasModifier("modifier_merlin_01_debuff") then
local effectIndex = ParticleManager:CreateParticle("particles/heroes/merlin/ability_merlin_music_buff.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, v:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
end
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability, 1)
if caster:HasModifier("modifier_lyrica_lunasa_merlin_combo") then
damage = damage * (1 + keys.damage_up/100)
end
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
if THTD_IsValid(v) then
local count = GetCountPrismriver(v)
local comboName = GetPrismriverComboName(v)
if comboName == "merlinlunasalyrica" then
OnMerlinLunasaLyrica(keys,caster,v,count)
ResetPrismriverComboName(v)
elseif comboName == "lunasamerlinlyrica" then
OnLunasaMerlinLyrica(keys,caster,v,count)
ResetPrismriverComboName(v)
end
end
end
caster:EmitSound("Sound_THTD.thtd_lyrica_01")
local effectIndex = ParticleManager:CreateParticle("particles/heroes/lyrica/ability_lyrica_01.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
function OnMerlinLunasaLyrica(keys,caster,target,count)
local targets = THTD_FindUnitsInRadius(caster,target:GetOrigin(),keys.radius)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability, 2) * (1 + keys.damage_up/100) * (1 + count)
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/lyrica/ability_lyrica_01.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, target:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
function OnLunasaMerlinLyrica(keys,caster,target,count)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability, 3) * (1 + keys.damage_up/100) * (1 + count)
local DamageTable = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end

View File

@@ -0,0 +1,369 @@
local marisa_star_table =
{
"particles/heroes/thtd_marisa/ability_marisa_02.vpcf",
"particles/heroes/thtd_marisa/ability_marisa_02_pink.vpcf",
"particles/heroes/thtd_marisa/ability_marisa_02_blue.vpcf",
"particles/heroes/thtd_marisa/ability_marisa_02_normal.vpcf",
}
function OnMarisa01SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
if caster.spelling_lock == true then return end
caster.factor = 0
if caster.ability_dummy_unit~=nil then
caster.ability_dummy_unit:RemoveSelf()
keys.ability.effectcircle = -1
ParticleManager:DestroyParticleSystem(keys.ability.effectcircle,true)
keys.ability.effectIndex = -1
ParticleManager:DestroyParticleSystem(keys.ability.effectIndex,true)
keys.ability.effectIndex_b = -1
ParticleManager:DestroyParticleSystem(keys.ability.effectIndex_b,true)
end
local unit = CreateUnitByName(
"npc_dota2x_unit_marisa04_spark"
,caster:GetOrigin()
,false
,caster
,caster
,caster:GetTeam()
)
local ability_dummy_unit = unit:FindAbilityByName("ability_dummy_unit")
ability_dummy_unit:SetLevel(1)
keys.ability.effectcircle = ParticleManager:CreateParticle("particles/heroes/marisa/marisa_04_spark_circle.vpcf", PATTACH_CUSTOMORIGIN, unit)
keys.ability.effectIndex = ParticleManager:CreateParticle("particles/thd2/heroes/marisa/marisa_04_spark.vpcf", PATTACH_CUSTOMORIGIN, unit)
keys.ability.effectIndex_b = ParticleManager:CreateParticle("particles/thd2/heroes/marisa/marisa_04_spark_wind_b.vpcf", PATTACH_CUSTOMORIGIN, unit)
keys.ability:SetContextNum("ability_marisa_04_spark_unit",unit:GetEntityIndex(),0)
MarisaSparkParticleControl(caster,keys.ability,targetPoint)
keys.ability:SetContextNum("ability_marisa_04_spark_lock",0,0)
caster.thtd_marisa_01_count = 1
caster.thtd_marisa_01_last_distance = 10
caster.thtd_marisa_01_currentForward = caster:GetForwardVector()
caster.ability_dummy_unit = unit
caster.spelling_lock = true
local locktime = keys.channel_time
caster:SetContextThink(DoUniqueString("thtd_marisa_lock"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if caster.spelling_lock == true then return nil end
if caster == nil or caster:IsNull() or caster:IsAlive() == false then return nil end
caster.spelling_lock = false
return nil
end,
locktime)
end
function MarisaSparkParticleControl(caster,ability,targetPoint)
local unitIndex = ability:GetContext("ability_marisa_04_spark_unit")
local unit = EntIndexToHScript(unitIndex)
if(ability.targetPoint == targetPoint)then
return
else
ability.targetPoint = targetPoint
end
if(unit == nil or ability.effectIndex == -1 or ability.effectcircle == -1)then
return
end
forwardRad = GetRadBetweenTwoVec2D(targetPoint,caster:GetOrigin())
vecForward = Vector(math.cos(math.pi/2 + forwardRad),math.sin(math.pi/2 + forwardRad),0)
unit:SetForwardVector(vecForward)
vecUnit = caster:GetOrigin() + Vector(caster:GetForwardVector().x * 100,caster:GetForwardVector().y * 100,160)
vecColor = Vector(255,255,255)
unit:SetAbsOrigin(vecUnit)
ParticleManager:SetParticleControl(ability.effectcircle, 0, caster:GetOrigin())
local effect2ForwardRad = GetRadBetweenTwoVec2D(caster:GetOrigin(),targetPoint)
local effect2VecForward = Vector(math.cos(effect2ForwardRad)*1400,math.sin(effect2ForwardRad)*1400,0) + caster:GetOrigin() + Vector(caster:GetForwardVector().x * 100,caster:GetForwardVector().y * 100,108)
ParticleManager:SetParticleControl(ability.effectIndex, 0, caster:GetOrigin() + Vector(caster:GetForwardVector().x * 92,caster:GetForwardVector().y * 92,150))
ParticleManager:SetParticleControl(ability.effectIndex, 1, effect2VecForward)
ParticleManager:SetParticleControl(ability.effectIndex, 2, vecColor)
local forwardRadwind = forwardRad + math.pi
ParticleManager:SetParticleControl(ability.effectIndex, 8, Vector(math.cos(forwardRadwind),math.sin(forwardRadwind),0))
ParticleManager:SetParticleControl(ability.effectIndex, 9, caster:GetOrigin() + Vector(caster:GetForwardVector().x * 100,caster:GetForwardVector().y * 100,108))
ParticleManager:SetParticleControl(ability.effectIndex_b, 0, caster:GetOrigin() + Vector(caster:GetForwardVector().x * 92,caster:GetForwardVector().y * 92,150))
ParticleManager:SetParticleControlForward(ability.effectIndex_b, 3, Vector(math.cos(forwardRadwind),math.sin(forwardRadwind),0))
end
function OnMarisa01SpellRemove(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
caster:THTD_AddPowerPercentage("thtd_marisa_03_bonus")
local unitIndex = keys.ability:GetContext("ability_marisa_04_spark_unit")
local unit = EntIndexToHScript(unitIndex)
if unit~=nil then
unit:RemoveSelf()
keys.ability.effectcircle = -1
ParticleManager:DestroyParticleSystem(keys.ability.effectcircle,true)
keys.ability.effectIndex = -1
ParticleManager:DestroyParticleSystem(keys.ability.effectIndex,true)
keys.ability.effectIndex_b = -1
ParticleManager:DestroyParticleSystem(keys.ability.effectIndex_b,true)
end
keys.ability:SetContextNum("ability_marisa_04_spark_lock",1,0)
if keys.ability:GetAbilityName() == "thtd_marisa_03" then
caster:StopSound("Sound_THTD.thtd_marisa_03")
else
caster:StopSound("Sound_THTD.thtd_marisa_01")
end
caster.ability_dummy_unit = nil
caster.spelling_lock = false
end
function FindMarisa01MaxCountEnemeiesForward(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local forwardVector = caster.thtd_marisa_01_currentForward
local targets = THTD_FindUnitsInRadius(caster,caster:GetOrigin(),keys.DamageLenth)
if #targets <= 0 then
return nil,0
end
local maxCount = 0
for i=1,120 do
local sparkRad = math.pi * i/60
local count = 0
for k,v in pairs(targets) do
if v~=nil and v:IsNull()==false and v:IsAlive() then
if IsRadInRect(v:GetOrigin(),caster:GetOrigin(),keys.DamageWidth,keys.DamageLenth,sparkRad) then
count = count + 1
end
end
end
if count > maxCount then
forwardVector = Vector(math.cos(sparkRad),math.sin(sparkRad),forwardVector.z)
maxCount = count
end
end
return forwardVector,maxCount
end
function GetMarisa01ForwardMove(forward,nextForward,rad)
local forwardVector = Vector(math.cos(rad)*forward.x - math.sin(rad)*forward.y,
forward.y*math.cos(rad) + forward.x*math.sin(rad),
0)
return forwardVector
end
function OnMarisa01SpellThink(keys)
if GameRules:IsGamePaused() then return end
if(keys.ability:GetContext("ability_marisa_04_spark_lock")==1)then
return
end
local caster = EntIndexToHScript(keys.caster_entindex)
local vecCaster = caster:GetOrigin()
if caster.factor == nil then
caster.factor = 0
end
if keys.ability:GetAbilityName() == "thtd_marisa_03" then
local nextForward,maxCount = FindMarisa01MaxCountEnemeiesForward(keys)
if nextForward ~= nil then
local forward = GetMarisa01ForwardMove(caster.thtd_marisa_01_currentForward,nextForward,caster.thtd_marisa_01_count * math.pi/180)
local distance = GetDistanceBetweenTwoVec2D(forward, nextForward)
if caster.thtd_marisa_01_last_distance <= distance then
caster.thtd_marisa_01_count = caster.thtd_marisa_01_count * -1
end
caster.thtd_marisa_01_last_distance = distance
local NowDamageTargets =
FindUnitsInLine(
caster:GetTeamNumber(),
caster:GetOrigin(),
caster:GetOrigin() + keys.DamageLenth * caster.thtd_marisa_01_currentForward,
nil,
keys.DamageWidth,
keys.ability:GetAbilityTargetTeam(),
keys.ability:GetAbilityTargetType(),
keys.ability:GetAbilityTargetFlags()
)
local NowCount = 0
for k,v in pairs(NowDamageTargets) do
if v~=nil and v:IsNull()==false and v:IsAlive() then
NowCount = NowCount + 1
end
end
if distance > math.sin(math.pi/18) and distance < 1.86 and NowCount~=maxCount then
caster:SetForwardVector(forward)
caster.thtd_marisa_01_currentForward = forward
end
else
caster:SetForwardVector(caster.thtd_marisa_01_currentForward)
end
if caster.factor == 100 then
local powerUp = 0
local pv = caster:GetAbilityPowerValue("thtd_marisa_03")
if pv ~= nil then
powerUp = pv[2]
end
local bonus = keys.power_up + powerUp
if caster:IsPower666() then
bonus = bonus * 2
end
caster:THTD_AddPowerPercentage(bonus, "thtd_marisa_03_bonus")
end
end
local targetPoint = vecCaster + caster.thtd_marisa_01_currentForward
if caster.factor % 10 == 0 then
local DamageTargets =
FindUnitsInLine(
caster:GetTeamNumber(),
caster:GetOrigin(),
caster:GetOrigin() + keys.DamageLenth * caster.thtd_marisa_01_currentForward,
nil,
keys.DamageWidth,
keys.ability:GetAbilityTargetTeam(),
keys.ability:GetAbilityTargetType(),
keys.ability:GetAbilityTargetFlags()
)
if #DamageTargets > 0 then
local powerDamage = 0
local pv = caster:GetAbilityPowerValue("thtd_marisa_03")
if pv ~= nil then
powerDamage = pv[1]
end
local deal_damage = (caster:THTD_GetAbilityPowerDamage(keys.ability) + powerDamage * caster:THTD_GetStarDamage()) * 0.2
if caster:FindAbilityByName("thtd_marisa_02"):GetLevel() > 1 then
deal_damage = deal_damage * (1 + 0.01 * caster.factor)
end
if caster:IsPower666() then deal_damage = deal_damage * 2 end
if caster:IsPower999() then deal_damage = deal_damage * 4 end
for _,v in pairs(DamageTargets) do
local info =
{
Target = v,
Source = caster,
Ability = keys.ability,
EffectName = marisa_star_table[RandomInt(1,#marisa_star_table)],
iMoveSpeed = 1400,
vSourceLoc= caster:GetAbsOrigin(), -- Optional (HOW)
bDrawsOnMinimap = false, -- Optional
bDodgeable = true, -- Optional
bIsAttack = false, -- Optional
bVisibleToEnemies = true, -- Optional
bReplaceExisting = false, -- Optional
flExpireTime = GameRules:GetGameTime() + 10, -- Optional but recommended
bProvidesVision = true, -- Optional
iVisionRadius = 400, -- Optional
iVisionTeamNumber = caster:GetTeamNumber() -- Optional
}
local projectile = ProjectileManager:CreateTrackingProjectile(info)
ParticleManager:DestroyLinearProjectileSystem(projectile,false)
local damage_table = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = deal_damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(damage_table)
end
end
end
caster.factor = caster.factor + 1
MarisaSparkParticleControl(caster,keys.ability,targetPoint)
end
function OnMarisa02AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local targetPoint = target:GetOrigin()
if keys.ability:GetLevel() < 1 then return end
local count = 2
local targets = THTD_FindUnitsInRadius(caster,caster:GetOrigin(),caster:Script_GetAttackRange())
caster:SetContextThink(DoUniqueString("thtd_marisa02_projectile"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if #targets > 0 then
local index = RandomInt(1,#targets)
local info =
{
Target = targets[index],
Source = caster,
Ability = keys.ability,
EffectName = marisa_star_table[RandomInt(1,#marisa_star_table)],
iMoveSpeed = 1400,
vSourceLoc= caster:GetAbsOrigin(), -- Optional (HOW)
bDrawsOnMinimap = false, -- Optional
bDodgeable = true, -- Optional
bIsAttack = false, -- Optional
bVisibleToEnemies = true, -- Optional
bReplaceExisting = false, -- Optional
flExpireTime = GameRules:GetGameTime() + 10, -- Optional but recommended
bProvidesVision = true, -- Optional
iVisionRadius = 400, -- Optional
iVisionTeamNumber = caster:GetTeamNumber() -- Optional
}
local projectile = ProjectileManager:CreateTrackingProjectile(info)
ParticleManager:DestroyLinearProjectileSystem(projectile,false)
caster:EmitSound("Hero_Marisa.PreAttack")
if count > 0 then
count = count - 1
return 0.1
end
end
return nil
end,
0.1)
end
function OnMarisa02SpellHit(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
target:EmitSound("Hero_Marisa.ProjectileImpact")
local powerDamage = 0
local pv = caster:GetAbilityPowerValue("thtd_marisa_02")
if pv ~= nil then
powerDamage = pv[1]
end
local DamageTable = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * (1 + powerDamage/100),
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
if keys.ability:GetAbilityName() == "thtd_marisa_02" then
caster:GiveMana(eys.mana)
end
end

View File

@@ -0,0 +1,171 @@
-- 回头、方向旋转角度实现可参考
function OnMedicine01AttackLandedOld(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local modifier = target:FindModifierByName("modifier_medicine_01_slow")
if modifier == nil then
keys.ability:ApplyDataDrivenModifier(caster, target, "modifier_medicine_01_slow", {Duration = keys.duration_time})
local time =keys.duration_time
local tick = keys.tick_time
target:AddPoison(1, caster)
target:SetContextThink(DoUniqueString("thtd_medicine01_debuff"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if THTD_IsValid(target) == false then return nil end
if time <= 0 then
target:AddPoison(-1)
return nil
end
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * tick
local DamageTable = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
time = time - tick
return tick
end,
0)
if target.thtd_is_fearing ~= true then
target.thtd_is_fearing = true
local current_next_move_point = target.next_move_point
target.next_move_point = RotatePosition(target:GetOrigin(), QAngle(0,RandomInt(-70, 70),0), target:GetOrigin() - target:GetForwardVector() * 500)
local time = keys.fear_time
target:SetContextThink(DoUniqueString("modifier_medicine_01_debuff"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if not IsValidAlive(target) then
return nil
end
if time <= 0 or THTD_IsValid(caster) == false then
target.next_move_point = current_next_move_point
target.thtd_is_fearing = false
return nil
end
time = time - 0.1
return 0.1
end,
0)
end
else
modifier:SetDuration(keys.duration_time,false)
end
end
function OnMedicine01AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local modifier = target:FindModifierByName("modifier_medicine_01_slow")
if modifier == nil then
keys.ability:ApplyDataDrivenModifier(caster, target, "modifier_medicine_01_slow", {Duration = keys.duration_time})
else
modifier:SetDuration(keys.duration_time,false)
end
local time = keys.duration_time
local tick = keys.tick_time
target:AddPoison(1, caster)
target:SetContextThink(DoUniqueString("thtd_medicine01_debuff"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if THTD_IsValid(target) == false then return nil end
if time <= 0 then
target:AddPoison(-1)
return nil
end
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * tick * target:GetPoisonCount()
local DamageTable = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
time = time - tick
return tick
end,
0)
end
function OnMedicine02SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_medicine/ability_medicine_02.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
ParticleManager:DestroyParticleSystemTime(effectIndex, keys.duration_time)
local time = math.floor(keys.duration_time * 100 + 0.5) / 100
local tick = math.floor(keys.tick_time * 100 + 0.5) / 100
-- print(keys.duration_time, time)
-- print(keys.tick_time, tick)
-- local startTime = GameRules:GetGameTime()
caster:SetContextThink(DoUniqueString("modifier_medicine_02_think"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if time <= 0 then
-- print("----- ability end")
-- print(GameRules:GetGameTime() - startTime)
return nil
end
if THTD_IsValid(caster) == false then
ParticleManager:DestroyParticleSystem(effectIndex,true)
return nil
end
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * tick
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.range)
for k,v in pairs(targets) do
if v.thtd_is_fearing ~= true then
v.thtd_is_fearing = true
v:AddPoison(1, caster)
local current_next_move_point = v.next_move_point
v.next_move_point = targetPoint
v:SetContextThink(DoUniqueString("modifier_medicine_02_debuff"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if not IsValidAlive(v) then
return nil
end
if time <= 0 or THTD_IsValid(caster) == false then
v.next_move_point = current_next_move_point
v.thtd_is_fearing = false
return nil
end
return 0.1
end,
0)
end
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
time = time - tick
return tick
end,
0)
end

View File

@@ -0,0 +1,316 @@
local thtd_meirin_01_activity =
{
[1] =
{
["action"] = ACT_DOTA_ATTACK,
["duration"] = 0.55,
func = function(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
local vecCaster = caster:GetOrigin()
local targetPoint = caster:GetOrigin() + caster:GetForwardVector()*800
--caster:EmitSoundParams("Hero_KeeperOfTheLight.Illuminate.Discharge",1,0.1,2)
local targets =
FindUnitsInLine(
caster:GetTeamNumber(),
caster:GetOrigin(),
caster:GetOrigin() + caster:GetForwardVector()*800,
nil,
300,
keys.ability:GetAbilityTargetTeam(),
keys.ability:GetAbilityTargetType(),
keys.ability:GetAbilityTargetFlags()
)
for k,v in pairs(targets) do
local DamageTable_aoe = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable_aoe)
end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_meirin/ability_meirin_01_step_1.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, vecCaster+Vector(0,0,32))
ParticleManager:SetParticleControl(effectIndex, 1, targetPoint+Vector(0,0,32))
ParticleManager:SetParticleControl(effectIndex, 9, vecCaster+Vector(0,0,32))
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
},
[2] =
{
["action"] = ACT_DOTA_ATTACK2,
["duration"] = 0.55,
func = function(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local vecCaster = caster:GetOrigin()
local targetPoint = caster:GetOrigin() + caster:GetForwardVector()*800
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
damage = damage * (1 + keys.damage_up)^1
--caster:EmitSoundParams("Hero_Tusk.WalrusPunch.Target",1,0.3,2)
local targets = THTD_FindUnitsInRadius(caster,caster:GetOrigin(),800)
for k,v in pairs(targets) do
local vVec = v:GetOrigin()
local vecRad = GetRadBetweenTwoVec2D(targetPoint,vecCaster)
if(IsPointInCircularSector(vVec.x,vVec.y,math.cos(vecRad),math.sin(vecRad),800,math.pi*2/3,vecCaster.x,vecCaster.y))then
local damage_table = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(damage_table)
end
end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_meirin/ability_meirin_01.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetOrigin())
ParticleManager:SetParticleControl(effectIndex, 1, caster:GetOrigin())
ParticleManager:SetParticleControlForward(effectIndex, 1 , caster:GetForwardVector())
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
},
[3] =
{
["action"] = ACT_DOTA_CAST_ABILITY_4,
["duration"] = 0.55,
func = function(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local vecCaster = caster:GetOrigin()
local targetPoint = caster:GetOrigin() + caster:GetForwardVector()*400
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
damage = damage * (1 + keys.damage_up)^2
-- caster:EmitSoundParams("Hero_EarthShaker.EchoSlamSmall",1,0.5,2)
caster:EmitSound("Hero_EarthShaker.EchoSlamSmall")
local targets = THTD_FindUnitsInRadius(caster,targetPoint,400)
for k,v in pairs(targets) do
local damage_table = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(damage_table)
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_meirin_01_slow_buff", {})
end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_meirin/ability_meirin_01_step_2.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
ParticleManager:SetParticleControl(effectIndex, 1, Vector(800,0,0))
ParticleManager:SetParticleControl(effectIndex, 2, Vector(255,140,0))
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
},
[4] =
{
["action"] = ACT_DOTA_CAST_ABILITY_5,
["duration"] = 0.55,
func = function(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local vecCaster = caster:GetOrigin()
local targetPoint = caster:GetOrigin() + caster:GetForwardVector()*800
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
damage = damage * (1 + keys.damage_up)^3
--caster:EmitSoundParams("Hero_Tusk.WalrusPunch.Target",1,0.35,2)
local targets = THTD_FindUnitsInRadius(caster,caster:GetOrigin(),800)
for k,v in pairs(targets) do
local vVec = v:GetOrigin()
local vecRad = GetRadBetweenTwoVec2D(targetPoint,vecCaster)
if(IsPointInCircularSector(vVec.x,vVec.y,math.cos(vecRad),math.sin(vecRad),800,math.pi*2/3,vecCaster.x,vecCaster.y))then
local damage_table = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(damage_table)
end
end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_meirin/ability_meirin_01.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetOrigin())
ParticleManager:SetParticleControl(effectIndex, 1, caster:GetOrigin())
ParticleManager:SetParticleControlForward(effectIndex, 1 , caster:GetForwardVector())
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
},
[5] =
{
["action"] = ACT_DOTA_CAST_ABILITY_4,
["duration"] = 0.55,
func = function(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local vecCaster = caster:GetOrigin()
local targetPoint = caster:GetOrigin() + caster:GetForwardVector()*400
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
damage = damage * (1 + keys.damage_up)^4
--caster:EmitSoundParams("Hero_Tusk.WalrusPunch.Damage",1,0.4,2)
local targets = THTD_FindUnitsInRadius(caster,targetPoint,400)
local stun_time = caster:GetAbilityValue("thtd_meirin_02", "level5_stun_time")
for k,v in pairs(targets) do
local damage_table = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(damage_table)
UnitStunTarget(caster,v,stun_time)
end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_meirin/ability_meirin_01_step_3.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
ParticleManager:SetParticleControl(effectIndex, 1, Vector(800,0,0))
ParticleManager:SetParticleControl(effectIndex, 2, Vector(255,140,0))
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
},
[6] =
{
["action"] = ACT_DOTA_CAST_ABILITY_6,
["duration"] = 0.55,
func = function(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local vecCaster = caster:GetOrigin()
local targetPoint = caster:GetOrigin() + caster:GetForwardVector()*800
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
damage = damage * (1 + keys.damage_up)^5
--caster:EmitSoundParams("Hero_KeeperOfTheLight.Illuminate.Discharge",1,0.25,2)
local targets =
FindUnitsInLine(
caster:GetTeamNumber(),
caster:GetOrigin(),
caster:GetOrigin() + caster:GetForwardVector()*800,
nil,
300,
keys.ability:GetAbilityTargetTeam(),
keys.ability:GetAbilityTargetType(),
keys.ability:GetAbilityTargetFlags()
)
for k,v in pairs(targets) do
local DamageTable_aoe = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable_aoe)
end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_meirin/ability_meirin_01_step_1.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, vecCaster+Vector(0,0,32))
ParticleManager:SetParticleControl(effectIndex, 1, targetPoint+Vector(0,0,32))
ParticleManager:SetParticleControl(effectIndex, 9, vecCaster+Vector(0,0,32))
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
},
[7] =
{
["action"] = ACT_DOTA_CAST_ABILITY_4,
["duration"] = 0.55,
func = function(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local vecCaster = caster:GetOrigin()
local targetPoint = caster:GetOrigin() + caster:GetForwardVector()*400
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
damage = damage * (1 + keys.damage_up)^6
-- damage = damage * 3
-- caster:EmitSoundParams("Hero_ElderTitan.EchoStomp",1,0.45,2)
caster:EmitSound("Hero_ElderTitan.EchoStomp")
local targets = THTD_FindUnitsInRadius(caster,targetPoint,400)
local stun_time = caster:GetAbilityValue("thtd_meirin_02", "level7_stun_time")
for k,v in pairs(targets) do
local damage_table = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(damage_table)
UnitStunTarget(caster,v,stun_time)
end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_meirin/ability_meirin_01_step_4.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
ParticleManager:SetParticleControl(effectIndex, 1, Vector(800,0,0))
ParticleManager:SetParticleControl(effectIndex, 2, Vector(221,160,221))
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
},
}
function OnMeirin01AttackThink(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if keys.ability:GetLevel() < 1 or caster:THTD_IsHidden() then return end
if caster.thtd_meirin_01_attack_step == nil then
caster.thtd_meirin_01_attack_step = 1
end
if caster:HasModifier("modifier_meirin_01_pause") == false then
local targets = THTD_FindUnitsInRadius(caster,caster:GetOrigin(),500)
if #targets > 0 and targets[1]~=nil and targets[1]:IsNull()==false and targets[1]:IsAlive() then
keys.target = targets[1]
local ability2 = caster:FindAbilityByName("thtd_meirin_02")
local chance = 100
local stun_time = 0
local level = 3
if ability2:IsActivated() then
level = 7
if caster.thtd_meirin_01_attack_step == 4 then
chance = ability2:GetSpecialValueFor("level4_chance")
elseif caster.thtd_meirin_01_attack_step == 6 then
chance = ability2:GetSpecialValueFor("level6_chance")
end
end
if caster.thtd_meirin_01_attack_step <= level and RollPercentage(chance) then
caster:StartGestureWithPlaybackRate(thtd_meirin_01_activity[caster.thtd_meirin_01_attack_step]["action"],1)
local func = thtd_meirin_01_activity[caster.thtd_meirin_01_attack_step].func
caster:EmitSound("Hero_Axe.PreAttack")
caster:SetContextThink(DoUniqueString("modifier_meirin_01_attack"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if func then
func(keys)
end
return nil
end,
thtd_meirin_01_activity[caster.thtd_meirin_01_attack_step]["duration"])
keys.ability:ApplyDataDrivenModifier(caster, caster, "modifier_meirin_01_pause", {duration=thtd_meirin_01_activity[caster.thtd_meirin_01_attack_step]["duration"]})
caster.thtd_meirin_01_attack_step = caster.thtd_meirin_01_attack_step + 1
else
caster.thtd_meirin_01_attack_step = 1
end
end
end
end

View File

@@ -0,0 +1,87 @@
function OnMerlin01SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
caster:EmitSound("Sound_THTD.thtd_merlin_01")
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.radius)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
for k,v in pairs(targets) do
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_merlin_01_debuff", nil)
UpdatePrismriverComboName(caster,v)
local comboName = GetPrismriverComboName(v)
if comboName == "lunasalyricamerlin" then
OnLunasaLyricaMerlin(keys,caster,v)
ResetPrismriverComboName(v)
elseif comboName == "lyricalunasamerlin" then
OnLyricaLunasaMerlin(keys,caster,v)
ResetPrismriverComboName(v)
end
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/merlin/ability_merlin_01.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
function OnMerlin01Created(keys)
keys.target:AddDamageOutgoingAll(keys.outgoing_percent, "thtd_merlin_01_damage_up")
end
function OnMerlin01Destroy(keys)
keys.target:AddDamageOutgoingAll("thtd_merlin_01_damage_up")
end
function OnMerlin02AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if keys.ability:GetLevel() < 1 then return end
local abilty_01 = caster:FindAbilityByName("thtd_merlin_01")
abilty_01:ApplyDataDrivenModifier(caster, target, "modifier_merlin_01_debuff", nil)
local DamageTable = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = caster:THTD_GetAbilityPowerDamage(keys.ability),
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
UpdatePrismriverComboName(caster,target)
end
function OnLunasaLyricaMerlin(keys,caster,target)
local targets = THTD_FindFriendlyUnitsInRadius(caster,caster:GetOrigin(),2500)
for k,v in pairs(targets) do
local unitName = v:GetUnitName()
if unitName == "lunasa" or unitName == "merlin" or unitName == "lyrica" then
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_merlin_01_buff", nil)
end
end
end
function OnLyricaLunasaMerlin(keys,caster,target)
local targets = THTD_FindFriendlyUnitsInRadius(caster,caster:GetOrigin(),2500)
for k,v in pairs(targets) do
local unitName = v:GetUnitName()
if unitName == "lunasa" or unitName == "merlin" or unitName == "lyrica" then
v:GiveMana(keys.mana_regen)
end
end
end

View File

@@ -0,0 +1,339 @@
function OnMiko01SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local forward = caster:GetForwardVector()
local effectIndex = ParticleManager:CreateParticle("particles/thd2/heroes/miko/ability_miko_01.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetOrigin()+Vector(0,0,64))
ParticleManager:SetParticleControlForward(effectIndex , 0, caster:GetForwardVector())
ParticleManager:DestroyParticleSystem(effectIndex,false)
keys.ability:ApplyDataDrivenModifier(caster, caster, "modifier_miko_01_pose", {})
local bonus = math.floor(keys.power_damage2 * caster:THTD_GetStarDamage())
for i=1,3 do
local rollRad = (i-2)*math.pi/4
local currentPoint = Vector(math.cos(rollRad)*forward.x - math.sin(rollRad)*forward.y,
forward.y*math.cos(rollRad) + forward.x*math.sin(rollRad),
0) * keys.range + caster:GetOrigin()
local targets =
FindUnitsInLine(
caster:GetTeamNumber(),
caster:GetOrigin(),
currentPoint,
nil,
200,
keys.ability:GetAbilityTargetTeam(),
keys.ability:GetAbilityTargetType(),
keys.ability:GetAbilityTargetFlags()
)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability, 1)
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
if THTD_IsValid(v) then
v:AddDamageBlockAll(-bonus, "thtd_miko_01_bonus")
local modifier = v:FindModifierByName("modifier_miko_01_debuff")
if modifier == nil then
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_miko_01_debuff", {})
else
modifier:SetDuration(keys.duration_time, false)
end
end
end
end
end
function OnDestroyMiko01DeBuff(keys)
keys.target:AddDamageBlockAll("thtd_miko_01_bonus")
end
function OnMiko02SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if THTD_IsTempleOfGodCanBuffedTower(target) then
if caster.thtd_miko_02_religious_count == nil then
caster.thtd_miko_02_religious_count = 0
end
if caster.thtd_miko_02_religious_count >= 6000 and target:HasModifier("modifier_miko_02_buff") == false then
local unitName = target:GetUnitName()
if unitName == "soga" then
target.thtd_miko_buff_soga01 = keys.soga01_cd
target.thtd_miko_buff_soga03 = keys.soga03_cd
elseif unitName == "futo" then
target.thtd_miko_buff_futo03 = keys.futo03_up
elseif unitName == "yoshika" then
target.thtd_miko_buff_yoshika = keys.yoshika
elseif unitName == "seiga" then
target.thtd_miko_buff_seiga = keys.seiga
end
caster:RemoveModifierByName("modifier_miko_02_ready")
keys.ability:ApplyDataDrivenModifier(caster, target, "modifier_miko_02_buff", {})
caster.thtd_miko_02_religious_count = 0
end
end
end
function OnMiko02SpellThink(keys)
if GameRules:IsGamePaused() then return end
local caster = EntIndexToHScript(keys.caster_entindex)
local targets = THTD_FindFriendlyUnitsInRadius(caster,caster:GetOrigin(),1500)
for k,v in pairs(targets) do
if THTD_IsTempleOfGodCanBuffedTower(v) then
if caster.thtd_miko_02_religious_count == nil then
caster.thtd_miko_02_religious_count = 0
end
if caster.thtd_miko_02_religious_count < 6000 then
caster.thtd_miko_02_religious_count = caster.thtd_miko_02_religious_count + 1
SendOverheadEventMessage(caster:GetPlayerOwner(), OVERHEAD_ALERT_BONUS_POISON_DAMAGE, caster, caster.thtd_miko_02_religious_count, caster:GetPlayerOwner() )
elseif caster:HasModifier("modifier_miko_02_ready") == false then
keys.ability:ApplyDataDrivenModifier(caster, caster, "modifier_miko_02_ready", {})
end
end
end
local count = 0
local friends = THTD_FindFriendlyUnitsAll(caster)
for k,v in pairs(friends) do
if THTD_IsTempleOfGodCanBuffedTower(v) then
local modifier = v:FindModifierByName("modifier_miko_02_buff")
if modifier ~= nil then
if modifier:GetCaster() == caster then
count = count + 1
end
end
end
end
if count > 0 then
if count ~= caster.thtd_miko_03_count then
caster:THTD_AddBasePower(keys.bonus_power * count, "thtd_miko_03_bonus")
caster:THTD_AddBaseAttack(keys.bonus_power * count, "thtd_miko_03_bonus")
caster:THTD_AddCritChance(keys.bonus_chance * count, "thtd_miko_03_bonus")
caster:THTD_AddCritDamage(keys.bonus_crit * count, "thtd_miko_03_bonus")
caster.thtd_miko_03_count = count
end
else
caster:THTD_AddBasePower("thtd_miko_03_bonus")
caster:THTD_AddBaseAttack("thtd_miko_03_bonus")
caster:THTD_AddCritChance("thtd_miko_03_bonus")
caster:THTD_AddCritDamage("thtd_miko_03_bonus")
if count ~= caster.thtd_miko_03_count then
caster.thtd_miko_03_count = count
end
end
end
function OnMiko03SpellHit(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local DamageTable = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = caster:THTD_GetAbilityPowerDamage(keys.ability),
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
function OnMiko03SpellThink(keys)
if GameRules:IsGamePaused() then return end
if keys.ability:GetLevel() < 1 then return end
local caster = EntIndexToHScript(keys.caster_entindex)
local targets = THTD_FindUnitsInRadius(caster,caster:GetOrigin(),1200)
if #targets > 0 then
local index = RandomInt(1,#targets)
if IsValidAlive(targets[index]) then
local info =
{
Target = targets[index],
Source = caster,
Ability = keys.ability,
EffectName = "particles/heroes/thtd_miko/ability_miko_03.vpcf",
iMoveSpeed = 1400,
vSourceLoc= caster:GetAbsOrigin(), -- Optional (HOW)
bDrawsOnMinimap = false, -- Optional
bDodgeable = true, -- Optional
bIsAttack = false, -- Optional
bVisibleToEnemies = true, -- Optional
bReplaceExisting = false, -- Optional
flExpireTime = GameRules:GetGameTime() + 10, -- Optional but recommended
bProvidesVision = true, -- Optional
iVisionRadius = 400, -- Optional
iVisionTeamNumber = caster:GetTeamNumber() -- Optional
}
local projectile = ProjectileManager:CreateTrackingProjectile(info)
ParticleManager:DestroyLinearProjectileSystem(projectile,false)
local friends = THTD_FindFriendlyUnitsAll(caster)
for k,believer in pairs(friends) do
if believer:HasModifier("modifier_miko_02_buff") then
local index_extra = RandomInt(1,#targets)
if IsValidAlive(targets[index_extra]) then
local info_extra =
{
Target = targets[index_extra],
Source = caster,
Ability = keys.ability,
EffectName = "particles/heroes/thtd_miko/ability_miko_03.vpcf",
iMoveSpeed = 1400,
vSourceLoc= caster:GetAbsOrigin(), -- Optional (HOW)
bDrawsOnMinimap = false, -- Optional
bDodgeable = true, -- Optional
bIsAttack = false, -- Optional
bVisibleToEnemies = true, -- Optional
bReplaceExisting = false, -- Optional
flExpireTime = GameRules:GetGameTime() + 10, -- Optional but recommended
bProvidesVision = true, -- Optional
iVisionRadius = 400, -- Optional
iVisionTeamNumber = caster:GetTeamNumber() -- Optional
}
local projectile_extra = ProjectileManager:CreateTrackingProjectile(info_extra)
ParticleManager:DestroyLinearProjectileSystem(projectile_extra,false)
end
end
end
end
end
end
function OnCreatedMiko04(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local forward = caster:GetForwardVector()
local ability = caster:FindAbilityByName("thtd_miko_01")
local power_damage2 = ability:GetSpecialValueFor("power_damage2")
local range = ability:GetSpecialValueFor("range")
local duration_time = math.floor(ability:GetSpecialValueFor("duration_time") * 100 + 0.5) / 100
local effectIndex = ParticleManager:CreateParticle("particles/thd2/heroes/miko/ability_miko_01.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetOrigin()+Vector(0,0,64))
ParticleManager:SetParticleControlForward(effectIndex , 0, caster:GetForwardVector())
ParticleManager:DestroyParticleSystem(effectIndex,false)
local bonus = math.floor(power_damage2 * caster:THTD_GetStarDamage())
for i=1,3 do
local rollRad = (i-2)*math.pi/4
local currentPoint = Vector(math.cos(rollRad)*forward.x - math.sin(rollRad)*forward.y,
forward.y*math.cos(rollRad) + forward.x*math.sin(rollRad),
0) * range + caster:GetOrigin()
local targets =
FindUnitsInLine(
caster:GetTeamNumber(),
caster:GetOrigin(),
currentPoint,
nil,
200,
ability:GetAbilityTargetTeam(),
ability:GetAbilityTargetType(),
ability:GetAbilityTargetFlags()
)
local damage = caster:THTD_GetAbilityPowerDamage(ability, 1)
for k,v in pairs(targets) do
local DamageTable = {
ability = ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
if THTD_IsValid(v) then
v:AddDamageBlockAll(-bonus, "thtd_miko_01_bonus")
local modifier = v:FindModifierByName("modifier_miko_01_debuff")
if modifier == nil then
ability:ApplyDataDrivenModifier(caster, v, "modifier_miko_01_debuff", {})
else
modifier:SetDuration(duration_time, false)
end
end
end
end
end
function OnMiko04SpellThink(keys)
if GameRules:IsGamePaused() then return end
local caster = EntIndexToHScript(keys.caster_entindex)
local inners = THTD_FindUnitsInner(caster)
local friends = THTD_FindFriendlyUnitsAll(caster)
local castUnits = {}
for k,v in pairs(friends) do
if v == caster then
table.insert(castUnits, v)
elseif v:HasModifier("modifier_miko_02_buff") then
local modifier = v:FindModifierByName("modifier_miko_04_pose")
if modifier == nil then
table.insert(castUnits, v)
elseif modifier:GetCaster() == caster then
table.insert(castUnits, v)
end
end
end
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
for index,believer in pairs(castUnits) do
local modifier = believer:FindModifierByName("modifier_miko_04_pose")
if modifier == nil then
-- tick+0.1
keys.ability:ApplyDataDrivenModifier(caster, believer, "modifier_miko_04_pose", {Duration = 0.5})
else
modifier:SetDuration(0.5, false)
end
if believer ~= caster then
modifier = believer:FindModifierByName("modifier_miko_04_pose_other")
if modifier == nil then
-- tick+0.1
keys.ability:ApplyDataDrivenModifier(caster, believer, "modifier_miko_04_pose_other", {Duration = 0.5})
else
modifier:SetDuration(0.5, false)
end
end
for k,v in pairs(inners) do
if RandomInt(1,3) == 1 then
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_miko/ability_thtd_miko_04_starfall.vpcf",PATTACH_CUSTOMORIGIN,caster)
ParticleManager:SetParticleControl(effectIndex, 0, v:GetOrigin())
ParticleManager:SetParticleControl(effectIndex, 2, RandomVector(255))
ParticleManager:SetParticleControl(effectIndex, 4, Vector(255,255,255))
ParticleManager:DestroyParticleSystem(effectIndex,false)
caster:SetContextThink(DoUniqueString("thtd_miko_04_star_fall"),
function()
if GameRules:IsGamePaused() then return 0.03 end
local damage_table = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = 0
}
UnitDamageTarget(damage_table)
return nil
end,
0.5)
end
end
end
end

View File

@@ -0,0 +1,463 @@
local BasePoint =
{
[0] = Vector(-3880,1880,128),
[1] = Vector(3880,1880,128),
[2] = Vector(3880,-1880,128),
[3] = Vector(-3880,-1880,128),
}
local StartPoint1 =
{
[0] = Vector(-4300,1588,128),
[1] = Vector(4300,1588,128),
[2] = Vector(4300,-1588,128),
[3] = Vector(-4300,-1588,128),
}
local EndPoint1 =
{
[0] = Vector(-1750,1588,128),
[1] = Vector(1750,1588,128),
[2] = Vector(1750,-1588,128),
[3] = Vector(-1750,-1588,128),
}
local StartPoint2 =
{
[0] = Vector(-4150,4100,128),
[1] = Vector(4150,4100,128),
[2] = Vector(4150,-4100,128),
[3] = Vector(-4150,-4100,128),
}
local EndPoint2 =
{
[0] = Vector(-4150,1600,128),
[1] = Vector(4150,1600,128),
[2] = Vector(4150,-1600,128),
[3] = Vector(-4150,-1600,128),
}
function OnMinamitsu01SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local hero = caster:GetOwner()
local id = caster:GetPlayerOwnerID()
local targetPoint, forward
local pos = caster:GetAbsOrigin()
if math.abs(pos.x - BasePoint[id].x) > math.abs(pos.y - BasePoint[id].y) then
targetPoint = StartPoint1[id]
forward = (EndPoint1[id] - StartPoint1[id]):Normalized()
caster.thtd_minamitsu_01_first = true
caster.water_start_point = StartPoint1[id]
caster.water_end_point = EndPoint1[id]
else
targetPoint = StartPoint2[id]
forward = (EndPoint2[id] - StartPoint2[id]):Normalized()
caster.thtd_minamitsu_01_first = false
caster.water_start_point = StartPoint2[id]
caster.water_end_point = EndPoint2[id]
end
if caster.thtd_minamitsu_01_rect == nil then
caster.thtd_minamitsu_01_rect = {}
end
if caster.thtd_minamitsu_01_rect["effectIndexList"] ~= nil then
for k,v in pairs(caster.thtd_minamitsu_01_rect["effectIndexList"]) do
ParticleManager:DestroyParticleSystem(v,true)
end
end
caster.thtd_minamitsu_01_rect =
{
["rectOrigin"] = targetPoint,
["rectForward"] = forward,
["effectIndexList"] = {}
}
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_minamitsu/ability_minamitsu_01_ship.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
ParticleManager:SetParticleControl(effectIndex, 1, forward*600)
ParticleManager:DestroyParticleSystem(effectIndex,false)
local time = 4
caster:SetContextThink(DoUniqueString("thtd_minamitsu_01_move_think"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if time > 0 then
time = time - 0.2
local waterIndex = ParticleManager:CreateParticle("particles/heroes/thtd_minamitsu/ability_minamitsu_01_ship_water.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(waterIndex, 3, targetPoint+forward*600*(4 - time))
table.insert(caster.thtd_minamitsu_01_rect["effectIndexList"],waterIndex)
return 0.2
else
return nil
end
end,
0)
end
function OnMinamitsu01DebuffThink(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if caster.thtd_minamitsu_01_rect ~= nil and caster.thtd_minamitsu_01_rect["rectOrigin"] ~= nil then
if caster:THTD_IsHidden() then
for k,v in pairs(caster.thtd_minamitsu_01_rect["effectIndexList"]) do
ParticleManager:DestroyParticleSystem(v,true)
end
caster.thtd_minamitsu_01_rect =
{
["rectOrigin"] = nil,
["rectForward"] = nil,
["effectIndexList"] = {}
}
else
local enemies = FindUnitsInLine(
caster:GetTeamNumber(),
caster.thtd_minamitsu_01_rect["rectOrigin"],
caster.thtd_minamitsu_01_rect["rectOrigin"]+caster.thtd_minamitsu_01_rect["rectForward"]*2500,
nil,
300,
DOTA_UNIT_TARGET_TEAM_ENEMY,
DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC,
0)
for k,v in pairs(enemies) do
local modifier = v:FindModifierByName("modifier_minamitsu_01_slow_buff")
if modifier == nil then
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_minamitsu_01_slow_buff", {duration=0.2})
else
modifier:SetDuration(0.2,false)
end
end
end
end
end
function OnCreatedMinamitsu02Buff(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
-- local effectIndex = ParticleManager:CreateParticle("particles/heroes/minamitsu/ability_minamitsu_03.vpcf", PATTACH_CUSTOMORIGIN, caster)
-- ParticleManager:SetParticleControlEnt(effectIndex , 0, caster, 5, "attach_minamitsu_attack", Vector(0,0,0), true)
local powerBonus = 0
local powerCd = 0
local pv = caster:GetAbilityPowerValue(keys.ability:GetAbilityName())
if pv ~= nil then
powerBonus = pv[1]
powerCd = pv[2]
end
if powerCd > 0 then
caster:ReCooldown(keys.ability, powerCd)
end
local effectIndex2 = ParticleManager:CreateParticle("particles/heroes/minamitsu/ability_minamitsu_03_body.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControlEnt(effectIndex2 , 0, caster, 5, "follow_origin", Vector(0,0,0), true)
ParticleManager:SetParticleControlEnt(effectIndex2 , 1, caster, 5, "follow_origin", Vector(0,0,0), true)
ParticleManager:SetParticleControlEnt(effectIndex2 , 3, caster, 5, "follow_origin", Vector(0,0,0), true)
ParticleManager:SetParticleControlEnt(effectIndex2 , 4, caster, 5, "follow_origin", Vector(0,0,0), true)
ParticleManager:DestroyParticleSystemTime(effectIndex2, keys.ability_duration)
local bonus = keys.power_bonus + powerBonus
target:THTD_AddPowerPercentage(bonus, "thtd_minamitsu_03_bonus")
target:THTD_AddAttackPercentage(bonus, "thtd_minamitsu_03_bonus")
end
function OnDestroyMinamitsu02Buff(keys)
local target = keys.target
target:THTD_AddPowerPercentage("thtd_minamitsu_03_bonus")
target:THTD_AddAttackPercentage("thtd_minamitsu_03_bonus")
end
function OnMinamitsu02AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local vecCaster = caster:GetOrigin()
local target = keys.target
local targets = THTD_FindUnitsInRadius(caster,target:GetOrigin(),keys.Radius)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
for k,v in pairs(targets) do
local damage_table = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = keys.ability:GetAbilityTargetFlags()
}
UnitDamageTarget(damage_table)
end
local effectIndex = ParticleManager:CreateParticle("particles/econ/items/kunkka/divine_anchor/hero_kunkka_dafx_weapon/kunkka_spell_tidebringer_fxset.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, vecCaster)
ParticleManager:SetParticleControlForward(effectIndex, 0, caster:GetForwardVector())
ParticleManager:SetParticleControl(effectIndex, 18, vecCaster)
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
function OnMinamitsu03SpellStart(keys)
if keys.ability:GetLevel() < 1 then return end
local caster = EntIndexToHScript(keys.caster_entindex)
if caster.thtd_minamitsu_01_rect == nil or caster.thtd_minamitsu_01_rect["rectOrigin"] == nil then
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner(), "display_custom_error", {msg="only_water_area_use"})
return
end
local targetPoint = keys.target_points[1]
local isValidPoint = false
local id = caster:GetPlayerOwnerID()
if caster.thtd_minamitsu_01_first == true then
if math.abs(targetPoint.x - StartPoint1[id].x) + math.abs(targetPoint.x - EndPoint1[id].x) <= math.abs(StartPoint1[id].x - EndPoint1[id].x) + 10 and math.abs(targetPoint.y - StartPoint1[id].y) <= 250 then
isValidPoint = true
end
else
if math.abs(targetPoint.y - StartPoint2[id].y) + math.abs(targetPoint.y - EndPoint2[id].y) <= math.abs(StartPoint2[id].y - EndPoint2[id].y) + 10 and math.abs(targetPoint.x - StartPoint2[id].x) <= 250 then
isValidPoint = true
end
end
if isValidPoint then
local vecCaster = caster:GetOrigin()
local distance = GetDistanceBetweenTwoVec2D(vecCaster,targetPoint)
local speed = distance * 0.03
local rad = GetRadBetweenTwoVec2D(vecCaster,targetPoint)
local vecHook = caster:GetOrigin()
local forwardVector = caster:GetForwardVector()
local timeCount = 0
local effectIndex = ParticleManager:CreateParticle("particles/heroes/minamitsu/ability_minamitsu_02_body.vpcf", PATTACH_CUSTOMORIGIN, nil)
ParticleManager:SetParticleControl(effectIndex, 3, vecHook)
ParticleManager:SetParticleControlForward(effectIndex, 3, forwardVector)
caster:SetContextThink(
DoUniqueString("ability_thdots_minamitsu_02_stage_01"),
function ()
if GameRules:IsGamePaused() then
return 0.03
end
timeCount = timeCount + 0.03
distance = distance - speed
if distance >= 0 then
vecHook = vecHook + Vector(math.cos(rad)*speed,math.sin(rad)*speed,0)
ParticleManager:SetParticleControl(effectIndex, 3, vecHook)
else
ParticleManager:DestroyParticleSystem(effectIndex,true)
local effectIndex2 = ParticleManager:CreateParticle("particles/heroes/minamitsu/ability_minamitsu_02.vpcf", PATTACH_CUSTOMORIGIN, nil)
ParticleManager:SetParticleControl(effectIndex2, 0, vecHook)
ParticleManager:SetParticleControl(effectIndex2, 3, vecHook)
Timer.Wait 'OnMinamitsu02Vortex' (0.5,
function()
caster:EmitSound("Voice_Thdots_Minamitsu.AbilityMinamitsu022")
OnMinamitsu02Vortex(keys,caster.thtd_minamitsu_01_rect["rectOrigin"],caster.thtd_minamitsu_01_rect["rectForward"])
end
)
Timer.Wait 'OnMinamitsu02Vortex' (3.2,
function()
ParticleManager:SetParticleControl(effectIndex2, 0, caster.thtd_minamitsu_01_rect["rectOrigin"]+caster.thtd_minamitsu_01_rect["rectForward"]*2500)
ParticleManager:SetParticleControl(effectIndex2, 3, caster.thtd_minamitsu_01_rect["rectOrigin"]+caster.thtd_minamitsu_01_rect["rectForward"]*2500)
end
)
return nil
end
return 0.03
end,
0.03
)
else
keys.ability:EndCooldown()
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner(), "display_custom_error", {msg="only_water_area_use"})
end
end
function OnMinamitsu02Vortex(keys,origin,forward)
local caster = EntIndexToHScript(keys.caster_entindex)
local vecCaster = caster:GetOrigin()
local targetPoint = keys.target_points[1]
local distance = GetDistanceBetweenTwoVec2D(vecCaster,targetPoint)
local rad = GetRadBetweenTwoVec2D(vecCaster,targetPoint)
local timeCount = 0
caster.ability_minamitsu_02_group = {}
local range = keys.range
caster:SetContextThink(DoUniqueString("ability_thdots_minamitsu_02_stage_02"),
function ()
if GameRules:IsGamePaused() then return 0.03 end
timeCount = timeCount + 0.15
local targets = THTD_FindUnitsInRadius(caster,targetPoint,range)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * 0.15
for k,v in pairs(targets) do
if v:IsNull() == false and v~=nil then
local damage_table = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = keys.ability:GetAbilityTargetFlags()
}
UnitDamageTarget(damage_table)
table.insert(caster.ability_minamitsu_02_group,v)
if v:HasModifier("modifier_minamitsu02_vortex_pause_target") == false then
keys.ability:ApplyDataDrivenModifier( caster, v, "modifier_minamitsu02_vortex_pause_target", {} )
end
if v:HasModifier("modifier_minamitsu02_vortex_target") == false then
local vecTarget = v:GetOrigin()
local distance = GetDistanceBetweenTwoVec2D(vecTarget,targetPoint)
local targetRad = GetRadBetweenTwoVec2D(targetPoint,vecTarget)
if distance > 150 then
v:SetAbsOrigin(Vector(vecTarget.x - math.cos(targetRad - math.pi/3) * 55 * 1.5, vecTarget.y - math.sin(targetRad - math.pi/3) * 55 * 1.5, vecTarget.z))
else
-- v:AddNoDraw()
keys.ability:ApplyDataDrivenModifier( caster, v, "modifier_minamitsu02_vortex_target", {} )
v:SetAbsOrigin(targetPoint)
end
end
end
end
if timeCount >= 1.5 then
Timer.Wait 'OnMinamitsu02Vortex_starge_2' (1.0,
function()
caster:EmitSound("Ability.Torrent")
OnMinamitsu02VortexEnd(keys,origin,forward)
end
)
return nil
end
return 0.15
end,
0.03)
end
function OnMinamitsu02VortexEnd(keys,origin,forward)
local caster = EntIndexToHScript(keys.caster_entindex)
local vecCaster = caster:GetOrigin()
local targetPoint = origin + forward * 2500
local speed = 2
local g = 0.18
local timeCount = 0
for k,v in pairs(caster.ability_minamitsu_02_group) do
if v:IsNull() == false and v~=nil then
if v.thtd_is_minamitsu_03_damaged ~= true then
v.thtd_is_minamitsu_03_damaged = true
local random = RandomVector(150)
v:SetAbsOrigin(targetPoint+random)
FindClearSpaceForUnit(v, v:GetOrigin(), false)
if caster.thtd_minamitsu_01_first == true then
v.next_move_forward = v.first_move_forward
v.next_move_point = v.first_move_point
end
end
end
end
caster:SetContextThink(
DoUniqueString("ability_thdots_minamitsu_02_stage_02"),
function ()
if GameRules:IsGamePaused() then return 0.03 end
timeCount = timeCount + 0.03
speed = speed - g
if caster.ability_minamitsu_02_group ~= nil then
for k,v in pairs(caster.ability_minamitsu_02_group) do
if v~=nil and v:IsNull() == false then
if v:HasModifier("modifier_minamitsu02_vortex_target") then
-- v:RemoveNoDraw()
v:RemoveModifierByName("modifier_minamitsu02_vortex_target")
end
if v:HasModifier("modifier_minamitsu02_vortex_pause_target") then
if v:GetOrigin().z >= GetGroundHeight(v:GetOrigin(),nil) then
v:SetAbsOrigin(v:GetOrigin() + Vector(0,0,speed))
end
end
end
end
if timeCount >= 1.0 then
for k2,v2 in pairs(caster.ability_minamitsu_02_group) do
if v2:HasModifier("modifier_minamitsu02_vortex_pause_target") then
v2:RemoveModifierByName("modifier_minamitsu02_vortex_pause_target")
end
FindClearSpaceForUnit(v2, v2:GetOrigin(), false)
end
return nil
end
end
return 0.03
end,
0.03
)
end
function OnMinamitsu04SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if caster:HasModifier("modifier_byakuren_03_buff") then
caster:ReCooldown(keys.ability, caster.thtd_byakuren_buff_minamitsu)
end
if caster.thtd_minamitsu_01_rect == nil or caster.thtd_minamitsu_01_rect["rectOrigin"] == nil then
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner(), "display_custom_error", {msg="only_water_area_use"})
return
end
local powerDamage = 0
local powerCount = 0
local pv = caster:GetAbilityPowerValue(keys.ability:GetAbilityName())
if pv ~= nil then
powerDamage = pv[1]
powerCount = pv[2]
end
local origin = caster.thtd_minamitsu_01_rect["rectOrigin"]
local forward = caster.thtd_minamitsu_01_rect["rectForward"]
local count = 1 + powerCount
if caster:IsPower999() then count = count + 7 end
caster:SetContextThink(DoUniqueString("thtd_minamitsu_04"),
function()
if not THTD_IsValid(caster) then return nil end
if count <= 0 then return nil end
count = count - 1
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_minamitsu/ability_minamitsu_01_ship.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, origin)
ParticleManager:SetParticleControl(effectIndex, 1, forward*1200)
ParticleManager:DestroyParticleSystemTime(effectIndex,2.0)
local time = 2
caster:SetContextThink(DoUniqueString("thtd_minamitsu_04_move_think"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if time > 0 then
time = time - 0.2
local targets = THTD_FindUnitsInRadius(caster,origin+forward*1200*(2 - time),300)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) + powerDamage * caster:THTD_GetStarDamage()
if caster:IsPower666() then
damage = damage + count * 20 * caster:THTD_GetStarDamage()
end
damage = damage * (1 + THTD_GetStarLotusTowerCount(caster) * keys.damage_up/100)
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage ,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
return 0.2
else
return nil
end
end,
0)
return 0.5
end,
0)
end

View File

@@ -0,0 +1,70 @@
function OnMinoriko02StarChange(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if target:GetUnitName() == "minoriko" or target:GetUnitName() == "sizuha" then
return
end
if target:THTD_IsTower() and target:GetOwner() == caster:GetOwner() and target:GetUnitName() ~= caster:GetUnitName() then
local hero = caster:GetOwner()
if hero.thtd_minoriko_02_change == nil then
hero.thtd_minoriko_02_change = 0
end
if GameRules:GetCustomGameDifficulty() >= FUNNY_MODE then
if SpawnSystem.CurWave < 11 then
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner(), "display_custom_error", {msg="minoriko_cannot_be_change"})
return
end
if SpawnSystem.CurWave < 21 and hero.thtd_minoriko_02_change >= 1 then
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner(), "display_custom_error", {msg="minoriko_change_one_tip"})
return
end
end
if hero.thtd_minoriko_02_change >= keys.max_count then
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="minoriko_max_change", duration=5, params={count=1}, color="#0ff"} )
return
end
hero.thtd_minoriko_02_change = hero.thtd_minoriko_02_change + 1
local star = target:THTD_GetStar()
target:THTD_SetStar(caster:THTD_GetStar())
target:THTD_SetLevel(THTD_MAX_LEVEL)
caster.thtd_is_changed = true
caster.thtd_star = star
caster:THTD_OpenAbility()
caster:THTD_DestroyLevelEffect()
caster:THTD_CreateLevelEffect()
if (target:GetUnitName() == "kaguya" and target:THTD_GetStar() < 4) then
if target.thtd_kaguya_03_treasure_table ~= nil and target.thtd_kaguya_03_treasure_table[1] ~= nil and target.thtd_kaguya_03_treasure_table[1]["effectIndex"] ~= nil then
local friends = THTD_FindFriendlyUnitsAll(target)
local enemies = THTD_FindUnitsAll(target)
for i=1,4 do
local buff = "modifier_kaguya_03_"..i.."_buff"
local debuff = "modifier_kaguya_03_"..i.."_debuff"
for k,v in pairs(friends) do
if v:FindModifierByNameAndCaster(buff,target)~=nil then
v:RemoveModifierByName(buff)
end
end
for k,v in pairs(enemies) do
if v:FindModifierByNameAndCaster(debuff,target)~=nil then
v:RemoveModifierByName(debuff)
end
end
if target.thtd_kaguya_03_treasure_table[i]["effectIndex"] ~= nil then
ParticleManager:DestroyParticleSystem(target.thtd_kaguya_03_treasure_table[i]["effectIndex"],true)
target.thtd_kaguya_03_treasure_table[i]["effectIndex"] = nil
end
end
end
end
end
end

View File

@@ -0,0 +1,107 @@
function OnMokou01AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if caster.thtd_mokou_01_crit_chance == nil then
caster.thtd_mokou_01_crit_chance = keys.base_chance
end
if caster.thtd_mokou_01_crit_chance < keys.max_chance then
caster.thtd_mokou_01_crit_chance = math.min(keys.max_chance, caster.thtd_mokou_01_crit_chance + keys.bonus_chance)
end
local modifier = caster:FindModifierByName("passive_mokou_01_crit")
if modifier ~= nil then
modifier:SetStackCount(caster.thtd_mokou_01_crit_chance)
modifier:SetDuration(keys.duration_time,false)
else
local modifier = keys.ability:ApplyDataDrivenModifier(caster, caster, "passive_mokou_01_crit", {Duration = keys.duration_time})
modifier:SetStackCount(caster.thtd_mokou_01_crit_chance)
end
local base_crit = caster:GetAbilityValue("thtd_mokou_02", "base_crit")
local max_crit = caster:GetAbilityValue("thtd_mokou_02", "max_crit")
if caster.thtd_mokou_01_crit_damage == nil then
caster.thtd_mokou_01_crit_damage = base_crit
end
if RollPercentage(caster.thtd_mokou_01_crit_chance) then
caster.thtd_mokou_01_crit_damage = math.min(max_crit, caster.thtd_mokou_01_crit_damage * base_crit)
local radius = keys.range
if caster:HasModifier("modifier_mokou_03_buff") then
radius = radius + caster:GetAbilityValue("thtd_mokou_03", "bonus_range")
end
local targets = THTD_FindUnitsInRadius(caster,target:GetOrigin(),radius)
local damage = caster:THTD_GetAttack() * caster.thtd_mokou_01_crit_damage
SendOverheadEventMessage(caster:GetPlayerOwner(), OVERHEAD_ALERT_DAMAGE, caster, caster.thtd_mokou_01_crit_damage, caster:GetPlayerOwner())
for k,v in pairs(targets) do
local DamageTable_aoe = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable_aoe)
end
if caster:HasModifier("modifier_mokou_03_buff") then
local effectIndex = ParticleManager:CreateParticle("particles/heroes/mouko/ability_mokou_01_boom.vpcf", PATTACH_CUSTOMORIGIN, nil)
ParticleManager:SetParticleControl(effectIndex, 0, target:GetOrigin())
ParticleManager:SetParticleControl(effectIndex, 1, target:GetOrigin())
ParticleManager:SetParticleControl(effectIndex, 3, target:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
caster:EmitSound("Hero_OgreMagi.Fireblast.Target")
else
local effectIndex = ParticleManager:CreateParticle("particles/thd2/heroes/mouko/ability_mokou_02_boom.vpcf", PATTACH_CUSTOMORIGIN, nil)
ParticleManager:SetParticleControl(effectIndex, 0, target:GetOrigin()+Vector(0,0,64))
ParticleManager:SetParticleControl(effectIndex, 1, Vector(1,1,1))
ParticleManager:DestroyParticleSystem(effectIndex,false)
caster:EmitSound("Hero_OgreMagi.Fireblast.Target")
end
else
caster.thtd_mokou_01_crit_damage = base_crit
end
local modifier = caster:FindModifierByName("modifier_mokou_crit_buff")
if modifier ~= nil then
modifier:SetStackCount(caster.thtd_mokou_01_crit_damage)
else
local modifier = keys.ability:ApplyDataDrivenModifier(caster, caster, "modifier_mokou_crit_buff", nil)
modifier:SetStackCount(caster.thtd_mokou_01_crit_damage)
end
end
function OnMokou01Remove(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
caster.thtd_mokou_01_crit_chance = keys.base_chance
caster.thtd_mokou_01_crit_damage = caster:GetAbilityValue("thtd_mokou_02", "base_crit")
local modifier = caster:FindModifierByName("modifier_mokou_crit_buff")
if modifier ~= nil then
modifier:SetStackCount(caster.thtd_mokou_01_crit_damage)
else
local modifier = keys.ability:ApplyDataDrivenModifier(caster, caster, "modifier_mokou_crit_buff", nil)
modifier:SetStackCount(caster.thtd_mokou_01_crit_damage)
end
end
function OnMokou03SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local effectIndex = ParticleManager:CreateParticle("particles/thd2/heroes/mouko/ability_mokou_04_wing.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControlEnt(effectIndex , 0, caster, 5, "follow_origin", Vector(0,0,0), true)
ParticleManager:DestroyParticleSystemTime(effectIndex,keys.duration_time)
keys.ability:ApplyDataDrivenModifier(caster,caster,"modifier_mokou_03_buff", {duration = keys.duration_time})
end
function OnCreatedMokou03Buff(keys)
keys.target:THTD_AddBaseAttack(keys.bonus_attack, "thtd_mokou_03_bonus")
end
function OnDestroyMokou03Buff(keys)
keys.target:THTD_AddBaseAttack("thtd_mokou_03_bonus")
end

View File

@@ -0,0 +1,140 @@
function OnMomiji01Spawn(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if caster.ability_momiji01_Spawn_unit == nil then
caster.ability_momiji01_Spawn_unit = {}
end
count = keys.max_count
for i=1,count do
local unit = CreateUnitByName(
"momiji_wolf"
,caster:GetOrigin() + ( caster:GetForwardVector() + Vector(math.cos((i-1.5)*math.pi/3),math.sin((i-1.5)*math.pi/3),0) ) * 100
,false
,caster:GetOwner()
,caster:GetOwner()
,caster:GetTeam()
)
if unit == nil then return end
unit:SetControllableByPlayer(caster:GetPlayerOwnerID(), false)
unit:SetBaseDamageMax(caster:THTD_GetStarDamage() * keys.wolf_attack)
unit:SetBaseDamageMin(caster:THTD_GetStarDamage() * keys.wolf_attack)
unit.thtd_spawn_unit_owner = caster
keys.ability:ApplyDataDrivenModifier(caster, unit, "modifier_momiji_01_buff", nil)
local hero = caster:GetOwner()
if GameRules.player_bb_buff[hero.thtd_player_id]["item_3016"] > 0 then
unit.bb_buff_3016 = GameRules.player_bb_buff[hero.thtd_player_id]["item_3016"]
unit:AddNewModifier(unit, nil, "modifier_bb_buff_3016_effect", nil):SetStackCount(GameRules.player_bb_buff[hero.thtd_player_id]["item_3016"])
end
local oldSwpanUnit = caster.ability_momiji01_Spawn_unit[i]
if oldSwpanUnit ~=nil and oldSwpanUnit:IsNull() == false then
oldSwpanUnit:ForceKill(false)
end
caster.ability_momiji01_Spawn_unit[i] = unit
local duration = keys.ability:GetCooldownTime()
unit:SetContextThink(DoUniqueString("thtd_momiji_01"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if GetDistanceBetweenTwoVec2D(caster:GetOrigin(), unit:GetOrigin()) > keys.range then
local forward = (unit:GetAbsOrigin() - caster:GetAbsOrigin()):Normalized()
unit:MoveToPosition(caster:GetOrigin() + forward * keys.range)
end
if duration > 0 then
duration = duration - 0.5
else
unit:AddNoDraw()
unit:ForceKill(false)
return nil
end
if not THTD_IsValid(caster) then
unit:AddNoDraw()
unit:ForceKill(false)
return nil
end
return 0.5
end,
0.5)
end
end
function OnMomiji02SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if target:GetPlayerOwnerID() ~= caster:GetPlayerOwnerID() then return end
if caster.ability_momiji_02_target == target then return end
if caster == target then return end
keys.ability:ApplyDataDrivenModifier(caster, target, "modifier_momiji_02", nil)
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_momiji/ability_momiji_02.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControlEnt(effectIndex , 0, target, 5, "follow_origin", Vector(0,0,0), true)
caster.ability_momiji_02_target = target
local count = 0
caster:SetContextThink(DoUniqueString("modifier_momiji_02"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if caster.ability_momiji_02_target ~= target then
if target~=nil and target:IsNull()==false and target:HasModifier("modifier_momiji_02") then
target:RemoveModifierByName("modifier_momiji_02")
end
ParticleManager:DestroyParticleSystem(effectIndex,true)
return nil
end
return 0.1
end,
0.1)
caster:SetContextThink("modifier_momiji_02_remove",
function()
if GameRules:IsGamePaused() then return 0.03 end
if caster:THTD_IsHidden() or keys.ability:GetLevel()<1 then
caster.ability_momiji_02_target = nil
return nil
end
return 0.1
end,
0.1)
end
function OnCreatedMomiji02Buff(keys)
local target = keys.target
local bonus = 0
if target:GetUnitName() == "aya" then
bonus = keys.aya_damage_up
else
bonus = keys.damage_up
end
target:AddDamageOutgoingPhysical(bonus, "thtd_momiji_02_damage_up")
end
function OnUpgradeMomiji02Buff(keys)
local caster = keys.caster
local targets = {}
if caster.ability_momiji_02_target ~= nil then
table.insert(targets, caster.ability_momiji_02_target)
end
for _,target in pairs(targets) do
local bonus = 0
if target:GetUnitName() == "aya" then
bonus = keys.aya_damage_up
else
bonus = keys.damage_up
end
target:AddDamageOutgoingPhysical(bonus, "thtd_momiji_02_damage_up")
end
targets = {}
end
function OnDestroyMomiji02Buff(keys)
keys.target:AddDamageOutgoingPhysical("thtd_momiji_02_damage_up")
end

View File

@@ -0,0 +1,40 @@
function OnMugiyousei01AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local powerDamage = 0
local powerDuration = 0
local pv = caster:GetAbilityPowerValue(keys.ability:GetAbilityName())
if pv ~= nil then
powerDamage = pv[1]
powerDuration = pv[2]
end
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * (1 + powerDamage)
local time = keys.damage_duration + powerDuration
target:AddPoison(1, caster)
target:SetContextThink(DoUniqueString("thtd_mugiyousei01_attack"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if time <= 0 or THTD_IsValid(target) == false then
if target ~= nil and target:IsNull() == false then
target:AddPoison(-1)
end
return nil
end
local DamageTable = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
time = time - 1.0
return 1.0
end,
0)
end

View File

@@ -0,0 +1,34 @@
function OnCreatedMystia01Debuff(keys)
local target = keys.target
target:AddPhysicalArmor(-keys.penetration)
end
function OnDestroyMystia01Debuff(keys)
local target = keys.target
target:AddPhysicalArmor(keys.penetration)
end
function OnThinkMystia02Buff(keys)
local caster = keys.caster
local targets = THTD_FindFriendlyUnitsInRadius(caster,caster:GetAbsOrigin(),keys.radius)
for k,v in pairs(targets) do
local modifier = v:FindModifierByName("modifier_mystia_02_buff")
-- 持续时间比think大一点
if modifier == nil then
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_mystia_02_buff", {Duration = 0.3})
else
modifier:SetDuration(0.3, false)
end
end
end
function OnCreatedMystia02Buff(keys)
keys.target:THTD_AddAttackPercentage(keys.critdamage, "thtd_mystia_02_bonus")
end
function OnDestroyMystia02Buff(keys)
keys.target:THTD_AddAttackPercentage("thtd_mystia_02_bonus")
end

View File

@@ -0,0 +1,33 @@
function OnNazrin01AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if SpawnSystem.IsUnLimited then
if caster:HasModifier("modifier_byakuren_03_buff") then
local targets = THTD_FindUnitsInRadius(caster,target:GetOrigin(),400)
local damage = caster:GetGold() * keys.nazrin/100
damage = damage * (1 + caster:THTD_GetPower() * keys.damage_up/1000)
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = DAMAGE_TYPE_PHYSICAL,
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
end
return
end
if GameRules:GetCustomGameDifficulty() >= FUNNY_MODE then return end
if RollPercentage(keys.BonusChance) then
local gold = math.floor(keys.BonusGold + caster:THTD_GetPower() * keys.PowerPercent/100)
THTD_ModifyGoldEx(caster:GetPlayerOwnerID(), gold , true, DOTA_ModifyGold_CreepKill)
SendOverheadEventMessage(caster:GetPlayerOwner(), OVERHEAD_ALERT_GOLD, target, gold, caster:GetPlayerOwner() )
caster:EmitSound("Sound_THTD.thtd_nazrin_01")
end
end

View File

@@ -0,0 +1,101 @@
function GetNueExtraDamage(caster)
local ability = caster:FindAbilityByName("thtd_nue_01")
local basedamage = caster:THTD_GetAbilityPowerDamage(ability)
local extradamage = caster:GetModifierStackCount("modifier_nue_01_extradamage", caster) or 0
return math.max(1, extradamage) * basedamage
end
function OnNue01SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local cooldown = keys.ability:GetCooldownTime()
caster.thtd_nue_01_duration = cooldown
keys.ability:StartCooldown(cooldown)
keys.ability:ApplyDataDrivenModifier(caster, caster, "modifier_nue_01_extradamage", {Duration = cooldown})
caster.modifier_extradamage_count = math.min(caster:GetModifierStackCount("modifier_nue_01_extradamage", caster) + 1, keys.max_count)
caster:SetModifierStackCount("modifier_nue_01_extradamage", caster, caster.modifier_extradamage_count)
local effectIndex = ParticleManager:CreateParticle("particles/heroes/nue/ability_nue_01_ball.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControlEnt(effectIndex , 0, caster, 5, "attach_ball", Vector(0,0,0), true)
ParticleManager:SetParticleControlEnt(effectIndex , 1, caster, 5, "attach_ball", Vector(0,0,0), true)
ParticleManager:DestroyParticleSystemTime(effectIndex,cooldown)
end
function OnNue01AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if target.thtd_damage_lock == true then return end
local effectIndex = ParticleManager:CreateParticle("particles/units/heroes/hero_templar_assassin/templar_assassin_meld_hit.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControlEnt(effectIndex , 0, target, 5, "attach_hitloc", Vector(0,0,0), true)
ParticleManager:SetParticleControlEnt(effectIndex , 3, target, 5, "attach_hitloc", Vector(0,0,0), true)
local DamageTable = {
victim = target,
attacker = caster,
ability = keys.ability,
damage = GetNueExtraDamage(caster) * keys.attack_bonus,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = keys.ability:GetAbilityTargetFlags()
}
if target:HasModifier("modifier_minamitsu_01_slow_buff") then
DamageTable.damage = DamageTable.damage * (1 + keys.damage_up/100)
end
UnitDamageTarget(DamageTable)
if caster:HasModifier("modifier_byakuren_03_buff") and THTD_IsValid(target) and target.thtd_damage_lock ~= true then
if target:GetHealthPercent() < caster.thtd_byakuren_buff_nue and target:HasModifier("modifier_nue_killed") == false then
keys.ability:ApplyDataDrivenModifier(caster, target, "modifier_nue_killed", {Duration = 30.0})
caster:AbilityKill(target, keys.ability)
end
end
end
-- buff时间到减1/3层
function OnNue01Destroy(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
caster.modifier_extradamage_count = math.floor(caster.modifier_extradamage_count * 2/3)
if caster.modifier_extradamage_count > 0 then
keys.ability:ApplyDataDrivenModifier(caster, caster, "modifier_nue_01_extradamage", {Duration = caster.thtd_nue_01_duration})
caster:SetModifierStackCount("modifier_nue_01_extradamage", caster, caster.modifier_extradamage_count)
end
end
function OnNue02SpellHit(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if target.thtd_damage_lock == true then return end
local damage_table = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = caster:THTD_GetAbilityPowerDamage(keys.ability) + GetNueExtraDamage(caster) * caster:GetAbilityValue("thtd_nue_01", "spell_bonus"),
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = keys.ability:GetAbilityTargetFlags()
}
if target:HasModifier("modifier_minamitsu_01_slow_buff") then
damage_table.damage = damage_table.damage * (1 + caster:GetAbilityValue("thtd_nue_01", "damage_up", true))
end
UnitDamageTarget(damage_table)
if caster:HasModifier("modifier_byakuren_03_buff") and THTD_IsValid(target) and target.thtd_damage_lock ~= true then
if target:GetHealthPercent() < caster.thtd_byakuren_buff_nue and target:HasModifier("modifier_nue_killed") == false then
keys.ability:ApplyDataDrivenModifier(caster, target, "modifier_nue_killed", {Duration = 30.0})
caster:AbilityKill(target, keys.ability)
end
end
end
function OnNue03Kill(keys)
local caster = keys.attacker
local target = keys.unit
local ability = nil
local level = keys.ability:GetLevel()
if level >= 1 then
ability = caster:FindAbilityByName("thtd_nue_01")
if ability~=nil then
ability:EndCooldown()
end
ability = caster:FindAbilityByName("thtd_nue_02")
if ability~=nil then
ability:EndCooldown()
end
end
end

View File

@@ -0,0 +1,356 @@
local PATCHOULI_01_AGNI_SHINE = 0
local PATCHOULI_01_BURY_IN_LAKE = 1
local PATCHOULI_01_MERCURY_POISON = 2
function GetPatchouliDamageCrit(caster)
local crit = 1
if caster:HasModifier("modifier_patchouli_01_buff_fire") then
crit = 2
end
if caster:IsPower999() then
crit = crit * 5
end
return crit
end
function OnPatchouli01SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if caster.thtd_power666_bonus ~= true then
if caster:IsPower666() then
caster.thtd_power666_bonus = true
caster:THTD_AddBasePower(3000)
end
else
if not caster:IsPower666() then
caster:THTD_AddBasePower(-3000)
caster.thtd_power666_bonus = nil
end
end
if caster.thtd_patchouli_02_type == nil then
caster.thtd_patchouli_02_type = PATCHOULI_01_AGNI_SHINE
end
if caster.thtd_patchouli_02_cast_type == nil then
caster.thtd_patchouli_02_cast_type = PATCHOULI_01_AGNI_SHINE
end
if caster.thtd_patchouli_02_type == PATCHOULI_01_AGNI_SHINE then
Patchouli01AgniShine(keys)
caster.thtd_patchouli_02_cast_type = PATCHOULI_01_AGNI_SHINE
elseif caster.thtd_patchouli_02_type == PATCHOULI_01_BURY_IN_LAKE then
Patchouli01BuryInLake(keys)
caster.thtd_patchouli_02_cast_type = PATCHOULI_01_BURY_IN_LAKE
elseif caster.thtd_patchouli_02_type == PATCHOULI_01_MERCURY_POISON then
Patchouli01MercuryPoison(keys)
caster.thtd_patchouli_02_cast_type = PATCHOULI_01_MERCURY_POISON
end
end
function Patchouli01AgniShine(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
local modifier = caster:FindModifierByName("modifier_patchouli_01_buff_fire")
if modifier == nil then
keys.ability:ApplyDataDrivenModifier(caster, caster, "modifier_patchouli_01_buff_fire", {Duration=10.0})
else
modifier:SetDuration(10, false)
end
local powerDamage = 0
local pv = caster:GetAbilityPowerValue("thtd_patchouli_01")
if pv ~= nil then
powerDamage = pv[1]
end
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.range1)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability, 1) * (1 + powerDamage/100) * GetPatchouliDamageCrit(caster)
for k,v in pairs(targets) do
local crit = 1
if v:HasModifier("modifier_patchouli_01_debuff_gold") then
crit = 2
end
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage * crit,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
caster:EmitSound("Hero_Invoker.Cataclysm.Ignite")
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_patchouli/ability_patchouli_01_agni_shine.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
ParticleManager:DestroyParticleSystemTime(effectIndex,2.0)
end
function Patchouli01BuryInLake(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
local modifier = caster:FindModifierByName("modifier_patchouli_01_buff_water")
if modifier == nil then
keys.ability:ApplyDataDrivenModifier(caster, caster, "modifier_patchouli_01_buff_water", {Duration=10.0})
else
modifier:SetDuration(10, false)
end
local powerDamage = 0
local pv = caster:GetAbilityPowerValue("thtd_patchouli_01")
if pv ~= nil then
powerDamage = pv[1]
end
local isFirst = true
local time = keys.duration_time2
caster:EmitSound("Sound_THTD.thtd_patchouli_01_02")
caster:SetContextThink(DoUniqueString("thtd_patchouli01_buryinlake"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if time <= 0 then return nil end
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.range2)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability, 2) * (1 + powerDamage/100) * 0.25 * GetPatchouliDamageCrit(caster)
for k,v in pairs(targets) do
local crit = 1
if v:HasModifier("modifier_patchouli_01_debuff_gold") then
crit = 2
end
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage * crit,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
if isFirst and v ~= nil and v.thtd_damage_lock ~= true and v:IsNull() == false and v:IsAlive() and v:GetHealthPercent() < 30 then
isFirst = false
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_patchouli/ability_patchouli_01_bury_in_lake_bury.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, v:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
EmitSoundOnLocationForAllies(v:GetOrigin(),"Hero_Kunkka.Tidebringer.Attack",caster)
caster:AbilityKill(v, keys.ability)
end
end
time = time - 0.25
return 0.25
end,
0)
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_patchouli/ability_patchouli_01_bury_in_lake.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
ParticleManager:DestroyParticleSystemTime(effectIndex,keys.duration_time2)
end
function Patchouli01MercuryPoison(keys)
if GameRules:IsGamePaused() then return end
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
local time = keys.duration_time3
EmitSoundOnLocationForAllies(targetPoint,"Sound_THTD.thtd_patchouli_01_03",caster)
caster:SetContextThink(DoUniqueString("thtd_patchouli01_mercuryposion"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if time <= 0 then return nil end
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.range3)
for k,v in pairs(targets) do
if v:HasModifier("modifier_patchouli_01_mercury_poison_debuff") == false then
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_patchouli_01_mercury_poison_debuff", nil)
end
if v:HasModifier("modifier_patchouli_01_debuff_gold") == false then
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_patchouli_01_debuff_gold", {Duration = 10.0})
end
end
time = time - 0.2
return 0.2
end,
0)
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_patchouli/ability_patchouli_01_mercury_poison.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
ParticleManager:DestroyParticleSystemTime(effectIndex,keys.duration_time3)
end
function OnPatchouli01MercuryPoisonThink(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local powerDamage = 0
local pv = caster:GetAbilityPowerValue("thtd_patchouli_01")
if pv ~= nil then
powerDamage = pv[1]
end
local crit = 1
if target:HasModifier("modifier_patchouli_01_debuff_gold") then
crit = 2
end
local DamageTable = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = caster:THTD_GetAbilityPowerDamage(keys.ability, 3) * (1 + powerDamage/100) * crit * 0.2 * GetPatchouliDamageCrit(caster),
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
function OnPatchouli01MercuryPoisonCreated(keys)
local caster = keys.caster
local unit = keys.target
unit:AddPoison(1, caster)
end
function OnPatchouli01MercuryPoisonDestroy(keys)
local caster = keys.caster
local unit = keys.target
unit:AddPoison(-1)
end
local BuffWaterEffect = {
"particles/econ/items/treant_protector/ti7_shoulder/treant_ti7_livingarmor.vpcf",
"particles/econ/items/treant_protector/ti7_shoulder/treant_ti7_crimson_livingarmor.vpcf",
"particles/econ/items/treant_protector/ti7_shoulder/treant_ti7_golden_livingarmor.vpcf",
}
function OnPatchouli01BuffWaterCreated(keys)
local caster = keys.caster
local effectIndex = ParticleManager:CreateParticle(BuffWaterEffect[RandomInt(1, #BuffWaterEffect)], PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetAbsOrigin())
ParticleManager:SetParticleControl(effectIndex, 1, caster:GetAbsOrigin())
caster.buff_water_effect = effectIndex
caster:THTD_AddManaRegenPercentage(100, "thtd_patchouli_01_manaregn_bonus")
end
function OnPatchouli01BuffWaterDestroy(keys)
local caster = keys.caster
if caster.buff_water_effect ~= nil then
ParticleManager:DestroyParticleSystem(caster.buff_water_effect, true)
caster.buff_water_effect = nil
end
caster:THTD_AddManaRegenPercentage("thtd_patchouli_01_manaregn_bonus")
end
function OnPatchouli02SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
caster:EmitSound("Hero_Invoker.Invoke")
if caster.thtd_patchouli_02_type == nil then
caster.thtd_patchouli_02_type = PATCHOULI_01_AGNI_SHINE
end
if caster.thtd_patchouli_02_type == PATCHOULI_01_AGNI_SHINE then
caster.thtd_patchouli_02_type = PATCHOULI_01_BURY_IN_LAKE
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_patchouli_bury_in_lake", duration=1, params={count=1}, color="#0ff"} )
elseif caster.thtd_patchouli_02_type == PATCHOULI_01_BURY_IN_LAKE then
caster.thtd_patchouli_02_type = PATCHOULI_01_MERCURY_POISON
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_patchouli_mercury_poison", duration=1, params={count=1}, color="#0ff"} )
elseif caster.thtd_patchouli_02_type == PATCHOULI_01_MERCURY_POISON then
caster.thtd_patchouli_02_type = PATCHOULI_01_AGNI_SHINE
CustomGameEventManager:Send_ServerToPlayer( caster:GetPlayerOwner() , "show_message", {msg="change_to_patchouli_agni_shine", duration=1, params={count=1}, color="#0ff"} )
end
end
function OnCreatedPatchouli03Buff(keys)
keys.target:AddDamageOutgoingMagical(keys.magic_outgoing, "thtd_patchouli_03_damage_up")
end
function OnDestroyPatchouli03Buff(keys)
keys.target:AddDamageOutgoingMagical("thtd_patchouli_03_damage_up")
end
function OnPatchouli04SpellStart(keys)
if keys.duration_time == 0 then return end
local caster = EntIndexToHScript(keys.caster_entindex)
local vecCaster = caster:GetOrigin()
if caster.thtd_power666_bonus ~= true then
if caster:IsPower666() then
caster.thtd_power666_bonus = true
caster:THTD_AddBasePower(2000)
end
else
if not caster:IsPower666() then
caster:THTD_AddBasePower(-2000)
caster.thtd_power666_bonus = nil
end
end
local count = 4
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_patchouli_04/ability_patchouli_04.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, vecCaster + Vector(0,0,256))
ParticleManager:SetParticleControl(effectIndex, 1, vecCaster + Vector(0,0,256))
ParticleManager:SetParticleControl(effectIndex, 3, vecCaster + Vector(0,0,256))
caster:SetContextThink(DoUniqueString("thtd_patchouli04_spell_start"),
function()
if GameRules:IsGamePaused() then return 0.03 end
count = count * 2
local radius = math.min(128,count)
ParticleManager:SetParticleControl(effectIndex, 14, Vector(radius,0,0))
if count > 100 then
OnPatchouli04SpellThink(keys)
ParticleManager:DestroyParticleSystemTimeFalse(effectIndex,3.0)
return nil
end
return 0.5
end,
0.5)
end
function OnPatchouli04SpellThink(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local time = keys.duration_time
local range = keys.range
THTD_SetSpellLock(caster, "thtd_patchouli_04_in_stun", time)
local powerDamage = 0
local pv = caster:GetAbilityPowerValue("thtd_patchouli_04")
if pv ~= nil then
powerDamage = pv[1]
end
caster:SetContextThink(DoUniqueString("thtd_patchouli04_spell_start"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if time <= 0 then return nil end
local targets = THTD_FindUnitsInRadius(caster,caster:GetOrigin(),range)
local damage = (caster:THTD_GetAbilityPowerDamage(keys.ability) + powerDamage * caster:THTD_GetStarDamage()) * 0.2 * GetPatchouliDamageCrit(caster)
for k,v in pairs(targets) do
local crit = 1
if v:HasModifier("modifier_patchouli_01_debuff_gold") then
crit = 2
end
UnitStunTarget(caster,v,0.2)
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage * crit,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
time = time - 0.2
return 0.2
end,
0)
end

View File

@@ -0,0 +1,157 @@
local ran_03_black_list =
{
"lily",
"daiyousei",
}
function IsInRan03BlackList(unit)
for k,v in pairs(ran_03_black_list) do
if unit:GetUnitName() == v then
return true
end
end
return false
end
local ran_03_ability_black_list =
{
"thtd_ran_01",
}
function IsInRan03AbilityBlackList(ability)
for k,v in pairs(ran_03_ability_black_list) do
if ability:GetAbilityName() == v then
return true
end
end
return false
end
function Ran01_OnSpellStart(keys)
local caster = keys.caster
local target = keys.target
local effectIndex = ParticleManager:CreateParticle("particles/heroes/ran/ability_ran_03_laser.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControlEnt(effectIndex , 0, caster, 5, "attach_hitloc", Vector(0,0,0), true)
ParticleManager:SetParticleControlEnt(effectIndex , 1, target, 5, "attach_hitloc", Vector(0,0,0), true)
ParticleManager:SetParticleControlEnt(effectIndex , 9, caster, 5, "attach_hitloc", Vector(0,0,0), true)
local target_point = target:GetOrigin()
local damage_table={
victim = target,
attacker = caster,
ability = keys.ability,
damage = caster:THTD_GetAbilityPowerDamage(keys.ability),
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(damage_table)
local target_unit = target
local jump_count = 1
local jumpAmount = keys.JumpCount
if target_unit ~= nil and target_unit:IsNull() == false and target_unit:IsAlive() and jumpAmount > 1 then
caster:SetContextThink("ran01_lazer_jumping",
function ()
if GameRules:IsGamePaused() then return 0.03 end
local enemies = THTD_FindUnitsInRadius(caster,target_point,keys.JumpRadius)
local next_target=nil
for _,v in pairs(enemies) do
if v~=nil and v:IsNull()==false and v:IsAlive() then
if v~=target_unit then
next_target=v
break
end
end
end
if next_target then
-- target_unit:EmitSound("Hero_Tinker.Laser")
effectIndex = ParticleManager:CreateParticle("particles/heroes/ran/ability_ran_03_laser.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControlEnt(effectIndex , 0, target_unit, 5, "attach_hitloc", Vector(0,0,0), true)
ParticleManager:SetParticleControlEnt(effectIndex , 1, next_target, 5, "attach_hitloc", Vector(0,0,0), true)
ParticleManager:SetParticleControlEnt(effectIndex , 9, target_unit, 5, "attach_hitloc", Vector(0,0,0), true)
target_unit = next_target
target_point = next_target:GetOrigin()
local DamageTable={
victim = target_unit,
attacker = caster,
ability = keys.ability,
damage = caster:THTD_GetAbilityPowerDamage(keys.ability),
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
-- next_target:EmitSoundParams("Hero_Tinker.LaserImpact",1.0,0.4,2.0)
end
jump_count=jump_count+1
if jump_count >= jumpAmount or next_target == nil or next_target:IsNull() or next_target:IsAlive() == false then
return nil
end
return keys.JumpInterval
end,
keys.JumpInterval)
end
end
function OnRan03SpellStart(keys)
local buffCaster = EntIndexToHScript(keys.caster_entindex) --本buff来源者
if keys.ability:GetLevel() < 1 then --本buff来源技能
return
end
local caster = keys.unit --本次触发的技能施放者
local ability = keys.event_ability --本次触发的施放的技能
local manaCost = caster:GetRealManaCost(ability)
if manaCost <= 0 then
return
end
if IsInRan03BlackList(keys.unit) or IsInRan03AbilityBlackList(keys.event_ability) then
return
end
if keys.mana_regen > 0 then
caster:GiveMana(manaCost * keys.mana_regen/100)
end
local ability01 = buffCaster:FindAbilityByName("thtd_ran_01")
ability01:EndCooldown()
buffCaster:GiveMana(buffCaster:GetRealManaCost(ability01))
local enemies = THTD_FindUnitsInRadius(buffCaster,buffCaster:GetOrigin(),buffCaster:GetAbilityValue("thtd_ran_01", "range"))
if #enemies > 0 then
local unit = nil
for _,v in pairs(enemies) do
if v~=nil and v:IsNull()==false and v:IsAlive() then
unit = v
break
end
end
if unit ~= nil then
buffCaster:CastAbilityOnTarget(unit,ability01,buffCaster:GetPlayerOwnerID())
end
end
-- local effectIndex = ParticleManager:CreateParticle("particles/heroes/ran/ability_ran_04_buff.vpcf", PATTACH_CUSTOMORIGIN, caster)
-- ParticleManager:SetParticleControlEnt(effectIndex , 0, keys.unit, 5, "follow_origin", Vector(0,0,0), true)
-- ParticleManager:DestroyParticleSystemTimeFalse(effectIndex,2.0)
-- 太吵,改为只有蓝显示
if buffCaster.thtd_ran_03_effect ~= true then
buffCaster.thtd_ran_03_effect = true
local effectIndex = ParticleManager:CreateParticle("particles/heroes/ran/ability_ran_04_buff.vpcf", PATTACH_CUSTOMORIGIN, buffCaster)
ParticleManager:SetParticleControlEnt(effectIndex , 0, buffCaster, 5, "follow_origin", Vector(0,0,0), true)
ParticleManager:DestroyParticleSystemTimeFalse(effectIndex,2.0)
buffCaster:SetContextThink(DoUniqueString("thtd_ran_03"),
function()
buffCaster.thtd_ran_03_effect = nil
return nil
end,
2.0)
end
end

View File

@@ -0,0 +1,359 @@
function OnReimu01AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if keys.ability:GetLevel() < 1 then return end
if caster.thtd_reimu_01_attack_count == nil then
caster.thtd_reimu_01_attack_count = 0
end
caster.thtd_reimu_01_attack_count = caster.thtd_reimu_01_attack_count + 1
if caster.thtd_reimu_01_attack_count >= keys.max_count then
caster.thtd_reimu_01_attack_count = 0
caster:EmitSound("Sound_THTD.thtd_reimu_01")
local count = 1
caster:SetContextThink(DoUniqueString("ability_reimu_01_projectile"),
function ()
if GameRules:IsGamePaused() then return 0.03 end
if count <= 3 then
Reimu01Projectile(keys,count)
count = count + 1
else
return nil
end
return 0.2
end,
0.2)
end
end
function OnReimu01ProjectileHit(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
local DamageTable = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = damage * Reimu02GetChance(caster),
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
function Reimu01Projectile(keys,count)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local rad = GetRadBetweenTwoVec2D(caster:GetOrigin(),target:GetOrigin())
local forward = Vector(math.cos(rad),math.sin(rad),caster:GetForwardVector().z)
local info =
{
Ability = keys.ability,
EffectName = "particles/heroes/thtd_reimu/ability_reimu_01_projectile.vpcf",
vSpawnOrigin = caster:GetOrigin() + Vector(0,0,128),
fDistance = 1000,
fStartRadius = 150,
fEndRadius = 150,
Source = caster,
bHasFrontalCone = false,
bReplaceExisting = false,
iUnitTargetTeam = DOTA_UNIT_TARGET_TEAM_ENEMY,
iUnitTargetFlags = DOTA_UNIT_TARGET_FLAG_NONE,
iUnitTargetType = DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC,
fExpireTime = GameRules:GetGameTime() + 10.0,
bDeleteOnHit = false,
vVelocity = forward * 1500,
bProvidesVision = true,
iVisionRadius = 1000,
iVisionTeamNumber = caster:GetTeamNumber()
}
local projectile = ProjectileManager:CreateLinearProjectile(info)
ParticleManager:DestroyLinearProjectileSystem(projectile,false)
for i=1,count do
local iVec = Vector( math.cos(rad + math.pi/18*(i+0.5)) * 2000 , math.sin(rad + math.pi/18*(i+0.5)) * 2000 , caster:GetForwardVector().z )
info.vVelocity = iVec
projectile = ProjectileManager:CreateLinearProjectile(info)
ParticleManager:DestroyLinearProjectileSystem(projectile,false)
iVec = Vector( math.cos(rad - math.pi/18*(i+0.5)) * 2000 , math.sin(rad - math.pi/18*(i+0.5)) * 2000 , caster:GetForwardVector().z )
info.vVelocity = iVec
projectile = ProjectileManager:CreateLinearProjectile(info)
ParticleManager:DestroyLinearProjectileSystem(projectile,false)
end
end
function Reimu02GetChance(caster)
if caster.thtd_reimu_04_ball_count == nil then
caster.thtd_reimu_04_ball_count = 0
end
if caster.thtd_reimu_04_hot_duration == nil then
caster.thtd_reimu_04_hot_duration = 0
end
if RollPercentage(caster:GetAbilityValue("thtd_reimu_02", "chance")) then
if caster.thtd_reimu_04_ball_count < 7 then
caster:EmitSound("Sound_THTD.thtd_reimu_02")
caster.thtd_reimu_04_ball_count = caster.thtd_reimu_04_ball_count + 1
caster.thtd_reimu_04_hot_duration = 20.0
end
return 2.0
end
return 1.0
end
function OnReimu03SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
caster:EmitSound("Sound_THTD.thtd_reimu_03_01")
Reimu03ThrowBallToPoint(keys,caster:GetOrigin(),targetPoint,120,1)
end
function Reimu03ThrowBallToPoint(keys,origin,targetpoint,vhigh,count)
local caster = EntIndexToHScript(keys.caster_entindex)
local curOrigin = Vector(origin.x,origin.y,origin.z)
local effectIndex = ParticleManager:CreateParticle("particles/heroes/reimu/reimu_01_ball.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, curOrigin)
ParticleManager:SetParticleControl(effectIndex, 1, Vector(1/count,0,0))
ParticleManager:SetParticleControl(effectIndex, 2, Vector(500/count,0,0))
local g = -10
local dis = GetDistanceBetweenTwoVec2D(origin,targetpoint)
local vh = vhigh
local t = math.abs(2*vh/g)
local speed = dis/t
local rad = GetRadBetweenTwoVec2D(origin,targetpoint)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
caster:SetContextThink(DoUniqueString("ability_reimu_03"),
function()
if GameRules:IsGamePaused() then return 0.03 end
vh = vh + g
curOrigin = Vector(curOrigin.x + math.cos(rad) * speed,curOrigin.y + math.sin(rad) * speed,curOrigin.z + vh)
ParticleManager:SetParticleControl(effectIndex, 0, curOrigin)
if curOrigin.z >= caster:GetOrigin().z - 50 then
return 0.02
else
curOrigin.z = caster:GetOrigin().z
ParticleManager:DestroyParticleSystem(effectIndex,true)
local effectIndex2 = ParticleManager:CreateParticle("particles/heroes/reimu/reimu_01_effect.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex2, 0, curOrigin)
ParticleManager:SetParticleControl(effectIndex2, 1, Vector(500/count,0,0))
ParticleManager:DestroyParticleSystem(effectIndex2,false)
local targets = THTD_FindUnitsInRadius(caster,curOrigin,keys.range/count)
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = math.floor((damage/count) * Reimu02GetChance(caster)),
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
UnitStunTarget(caster,v,keys.stun_time/count)
end
if count < keys.max_count then
count = count + 1
for i=1,count do
Reimu03ThrowBallToPoint(keys,curOrigin,curOrigin+RandomVector(300-count*30),vhigh*400/442,count)
end
end
caster:EmitSound("Sound_THTD.thtd_reimu_03_02")
return nil
end
end,
0)
end
function OnReimu04SpellThink(keys)
if GameRules:IsGamePaused() then return end
if keys.ability:GetLevel() < 1 then return end
local caster = EntIndexToHScript(keys.caster_entindex)
-- 初始化
if caster.thtd_reimu_04_ball_count == nil then
caster.thtd_reimu_04_ball_count = 0
end
if caster.thtd_reimu_04_think_count == nil then
caster.thtd_reimu_04_think_count = 0
end
if caster.thtd_reimu_04_think_count < 72 then
caster.thtd_reimu_04_think_count = caster.thtd_reimu_04_think_count + 1
else
caster.thtd_reimu_04_think_count = 0
end
if caster.thtd_reimu_04_ball_table == nil then
caster.thtd_reimu_04_ball_table = {}
end
for i=1,7 do
if caster.thtd_reimu_04_ball_table[i] == nil then
caster.thtd_reimu_04_ball_table[i] = {}
end
caster.thtd_reimu_04_ball_table[i]["origin"] =
caster:GetOrigin() +
Vector(
math.cos(i*2*math.pi/7 + caster.thtd_reimu_04_think_count * math.pi/36)*75,
math.sin(i*2*math.pi/7 + caster.thtd_reimu_04_think_count * math.pi/36)*75,
128)
end
-- 根据积累数量初始化光球
if caster.thtd_reimu_04_ball_count > 0 then
for i=1,caster.thtd_reimu_04_ball_count do
if caster.thtd_reimu_04_ball_table[i]["effectIndex"] == nil then
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_reimu/ability_reimu_04.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 1, Vector(1/12,0,0))
ParticleManager:SetParticleControl(effectIndex, 2, Vector(500/12,0,0))
caster.thtd_reimu_04_ball_table[i]["effectIndex"] = effectIndex
end
end
end
-- 旋转光球
for i=1,7 do
if caster.thtd_reimu_04_ball_table[i]["effectIndex"] ~= nil then
ParticleManager:SetParticleControl(caster.thtd_reimu_04_ball_table[i]["effectIndex"], 0, caster.thtd_reimu_04_ball_table[i]["origin"] )
end
end
if caster.thtd_reimu_04_ball_count == 7 and caster.thtd_reimu_04_ball_7_bonus == nil then
caster.thtd_reimu_04_ball_7_bonus = keys.power_up
if caster:IsPower999() then caster.thtd_reimu_04_ball_7_bonus = caster.thtd_reimu_04_ball_7_bonus * 7 end
caster:THTD_AddPowerPercentage(caster.thtd_reimu_04_ball_7_bonus, "thtd_reimu_04_power_buff")
caster:SetContextThink(DoUniqueString("thtd_reimu_04_power_bonus"),
function ()
if GameRules:IsGamePaused() then return 0.03 end
caster:THTD_AddPowerPercentage("thtd_reimu_04_power_buff")
caster.thtd_reimu_04_ball_7_bonus = nil
return nil
end,
7.0)
end
local tick_count = 36
if caster:IsPower666() then tick_count = 12 end
-- 光球攻击行为
if caster.thtd_reimu_04_ball_count == 7 and caster.thtd_reimu_04_think_count%tick_count == 0 then -- 原始为8卡顿改善及伤害系数平衡
if caster.thtd_reimu_04_think_count >= 72 then caster.thtd_reimu_04_think_count = 0 end -- 修复达到72后连续触发0余数为0造成
Reimu04AttackTargetPoint(keys)
for i=1,7 do
if caster.thtd_reimu_04_ball_table[i]["effectIndex"] ~= nil then
ParticleManager:SetParticleControl(caster.thtd_reimu_04_ball_table[i]["effectIndex"], 3, Vector(1000/12,0,0))
end
end
end
-- 保持热度时间,结束光球
if caster.thtd_reimu_04_hot_duration == nil then
caster.thtd_reimu_04_hot_duration = 0
end
caster.thtd_reimu_04_hot_duration = caster.thtd_reimu_04_hot_duration - 0.02
if caster.thtd_reimu_04_hot_duration < 0 then
Reimu04ReleaseBall(keys)
end
end
function Reimu04ReleaseBall(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if caster.thtd_reimu_04_ball_table ~= nil then
caster.thtd_reimu_04_hot_duration = 0
caster.thtd_reimu_04_ball_count = 0
for i=1,7 do
if caster.thtd_reimu_04_ball_table[i]["effectIndex"] ~= nil then
ParticleManager:DestroyParticleSystem(caster.thtd_reimu_04_ball_table[i]["effectIndex"],true)
caster.thtd_reimu_04_ball_table[i]["effectIndex"] = nil
end
end
end
end
function Reimu04AttackTargetPoint(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targets = THTD_FindUnitsInRadius(caster,caster:GetOrigin(),1000)
if targets[1]==nil then return end
caster:EmitSound("Sound_THTD.thtd_reimu_04_01")
local target = targets[1]
local vecCaster = caster.thtd_reimu_04_ball_table[RandomInt(1,7)]["origin"]
local pointRad = GetRadBetweenTwoVec2D(vecCaster,target:GetOrigin())
local randomPi = RandomFloat(-2*math.pi,2*math.pi)
local forwardVec = Vector(math.cos(pointRad+randomPi), math.sin(pointRad+randomPi),RandomFloat(0,1))
local BulletTable = {
Ability = keys.ability,
EffectName = "particles/heroes/thtd_reimu/ability_reimu_04_projectile.vpcf",
vSpawnOrigin = vecCaster,
vSpawnOriginNew = vecCaster,
fDistance = 5000,
fStartRadius = 60,
fEndRadius = 60,
Source = caster,
bHasFrontalCone = false,
bRepalceExisting = false,
iUnitTargetTeams = "DOTA_UNIT_TARGET_TEAM_ENEMY",
iUnitTargetTypes = "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_CREEP",
iUnitTargetFlags = "DOTA_UNIT_TARGET_FLAG_NONE",
fExpireTime = GameRules:GetGameTime() + 10.0,
bDeleteOnHit = true,
vVelocity = forwardVec,
bProvidesVision = true,
iVisionRadius = 400,
iVisionTeamNumber = caster:GetTeamNumber(),
}
local speed = 2000
local acc = 200
local iVelo = 1000
CreateProjectileMoveToTarget(BulletTable,caster,target,speed,iVelo,-acc,
function(unit,vec)
local targetpoint = Vector(vec.x,vec.y,caster:GetOrigin().z)
local targets = THTD_FindUnitsInRadius(caster,targetpoint,keys.range)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
for k,v in pairs(targets) do
local damage_table = {
victim = v,
attacker = caster,
damage = damage * Reimu02GetChance(caster),
ability = keys.ability,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(damage_table)
end
caster:EmitSound("Sound_THTD.thtd_reimu_04_02")
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_reimu/ability_reimu_04_explosion.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetpoint)
ParticleManager:SetParticleControl(effectIndex, 3, targetpoint)
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
)
end

View File

@@ -0,0 +1,987 @@
local reimu_pet_sound =
{
"UI.Aowu",
"Icewrack_Pup.Ult.Howl",
"Icewrack_Pup.Flee",
"Icewrack_Pup.idle_alt_bark",
"Icewrack_Pup.Alert",
"Icewrack_Pup.Happy",
"Icewrack_Pup.Breath",
}
local reimu_pet_model =
{
-- 默认
h000 = "models/items/courier/courier_ti10_radiant/courier_ti10_radiant.vmdl",
h000b = "models/items/courier/courier_ti10_radiant/courier_ti10_radiant_lvl2/courier_ti10_radiant_lvl2.vmdl",
h000c = "models/items/courier/courier_ti10_radiant/courier_ti10_radiant_lvl3/courier_ti10_radiant_lvl3.vmdl",
h000d = "models/items/courier/courier_ti10_radiant/courier_ti10_radiant_lvl4/courier_ti10_radiant_lvl4.vmdl",
h000e = "models/items/courier/courier_ti10_radiant/courier_ti10_radiant_lvl5/courier_ti10_radiant_lvl5.vmdl",
h000f = "models/items/courier/courier_ti10_radiant/courier_ti10_radiant_lvl6/courier_ti10_radiant_lvl6.vmdl",
h000g = "models/items/courier/courier_ti10_radiant/courier_ti10_radiant_lvl7/courier_ti10_radiant_lvl7.vmdl",
h001 = "models/pets/icewrack_wolf/icewrack_wolf.vmdl",
h002 = "models/heroes/invoker_kid/invoker_kid_trainer_dragon.vmdl",
-- h001 = "models/props_gameplay/donkey.vmdl", -- 默认信使,小马,天辉
-- h002 = "models/props_gameplay/donkey_dire.vmdl", -- 默认信使,小马,夜宴
h003 = "models/pets/armadillo/armadillo.vmdl",
h004 = "models/courier/baby_rosh/babyroshan_ti9.vmdl",
--普通信使 beginner
h101 = "models/courier/skippy_parrot/skippy_parrot.vmdl",
h102 = "models/courier/smeevil_mammoth/smeevil_mammoth.vmdl",
h103 = "models/items/courier/arneyb_rabbit/arneyb_rabbit.vmdl",
h104 = "models/items/courier/axolotl/axolotl.vmdl",
h105 = "models/items/courier/coco_the_courageous/coco_the_courageous.vmdl",
h106 = "models/items/courier/coral_furryfish/coral_furryfish.vmdl",
h107 = "models/items/courier/corsair_ship/corsair_ship.vmdl",
h108 = "models/items/courier/duskie/duskie.vmdl",
h109 = "models/items/courier/itsy/itsy.vmdl",
h110 = "models/items/courier/jumo/jumo.vmdl",
h111 = "models/items/courier/mighty_chicken/mighty_chicken.vmdl",
h112 = "models/items/courier/nexon_turtle_05_green/nexon_turtle_05_green.vmdl",
h113 = "models/items/courier/pumpkin_courier/pumpkin_courier.vmdl",
h114 = "models/items/courier/pw_ostrich/pw_ostrich.vmdl",
h115 = "models/items/courier/scuttling_scotty_penguin/scuttling_scotty_penguin.vmdl",
h116 = "models/items/courier/shagbark/shagbark.vmdl",
h117 = "models/items/courier/snaggletooth_red_panda/snaggletooth_red_panda.vmdl",
h118 = "models/items/courier/snail/courier_snail.vmdl",
h119 = "models/items/courier/teron/teron.vmdl",
h120 = "models/items/courier/xianhe_stork/xianhe_stork.vmdl",
h121 = "models/items/courier/starladder_grillhound/starladder_grillhound.vmdl",
h122 = "models/items/courier/pw_zombie/pw_zombie.vmdl",
h123 = "models/items/courier/raiq/raiq.vmdl",
h124 = "models/courier/frog/frog.vmdl",
h125 = "models/courier/godhorse/godhorse.vmdl",
h126 = "models/courier/imp/imp.vmdl",
h127 = "models/courier/mighty_boar/mighty_boar.vmdl",
h128 = "models/items/courier/onibi_lvl_03/onibi_lvl_03.vmdl",
h129 = "models/items/courier/echo_wisp/echo_wisp.vmdl", --蠕行水母
h130 = "models/courier/sw_donkey/sw_donkey.vmdl", --驴法师new
h131 = "models/items/courier/gnomepig/gnomepig.vmdl", --丰臀公主new
h132 = "models/items/furion/treant/ravenous_woodfang/ravenous_woodfang.vmdl",--焚牙树精new
h133 = "models/courier/mechjaw/mechjaw.vmdl",--机械咬人箱new
h134 = "models/items/courier/mole_messenger/mole_messenger.vmdl",--1级矿车老鼠
h135 = "models/items/courier/jumo_dire/jumo_dire.vmdl",
h136 = "models/items/courier/courier_ti9/courier_ti9.vmdl",
h137 = "models/items/courier/courier_ti9/courier_ti9_lvl2/courier_ti9_lvl2.vmdl",
h138 = "models/props_gameplay/donkey.vmdl",
h139 = "models/hy/huya.vmdl",
--小英雄信使 ameteur
h201 = "models/courier/doom_demihero_courier/doom_demihero_courier.vmdl",
h202 = "models/courier/huntling/huntling.vmdl",
h203 = "models/courier/minipudge/minipudge.vmdl",
h204 = "models/courier/seekling/seekling.vmdl",
h205 = "models/items/courier/baekho/baekho.vmdl",
h206 = "models/items/courier/basim/basim.vmdl",
h207 = "models/items/courier/devourling/devourling.vmdl",
h208 = "models/items/courier/faceless_rex/faceless_rex.vmdl",
h209 = "models/items/courier/tinkbot/tinkbot.vmdl",
h210 = "models/items/courier/lilnova/lilnova.vmdl",
h211 = "models/items/courier/amphibian_kid/amphibian_kid.vmdl",
h212 = "models/courier/venoling/venoling.vmdl",
h213 = "models/courier/juggernaut_dog/juggernaut_dog.vmdl",
h214 = "models/courier/otter_dragon/otter_dragon.vmdl",
h215 = "models/items/courier/boooofus_courier/boooofus_courier.vmdl",
h216 = "models/courier/baby_winter_wyvern/baby_winter_wyvern.vmdl",
h217 = "models/courier/yak/yak.vmdl",
h218 = "models/items/furion/treant/eternalseasons_treant/eternalseasons_treant.vmdl",
h219 = "models/items/courier/blue_lightning_horse/blue_lightning_horse.vmdl",
h220 = "models/items/courier/waldi_the_faithful/waldi_the_faithful.vmdl",
h221 = "models/items/courier/bajie_pig/bajie_pig.vmdl",
h222 = "models/items/courier/courier_faun/courier_faun.vmdl",
h223 = "models/items/courier/livery_llama_courier/livery_llama_courier.vmdl",
h224 = "models/items/courier/onibi_lvl_10/onibi_lvl_10.vmdl",
h225 = "models/items/courier/little_fraid_the_courier_of_simons_retribution/little_fraid_the_courier_of_simons_retribution.vmdl", --胆小南瓜人
h226 = "models/items/courier/hermit_crab/hermit_crab.vmdl", --螃蟹1
h227 = "models/items/courier/hermit_crab/hermit_crab_boot.vmdl", --螃蟹2
h228 = "models/items/courier/hermit_crab/hermit_crab_shield.vmdl", --螃蟹3
h229 = "models/courier/donkey_unicorn/donkey_unicorn.vmdl", --竭智法师new
h230 = "models/items/courier/white_the_crystal_courier/white_the_crystal_courier.vmdl", --蓝心白隼new
h231 = "models/items/furion/treant/furion_treant_nelum_red/furion_treant_nelum_red.vmdl",--莲花人new
h232 = "models/courier/beetlejaws/mesh/beetlejaws.vmdl",--甲虫咬人箱new
h233 = "models/courier/smeevil_bird/smeevil_bird.vmdl",
h234 = "models/items/courier/mole_messenger/mole_messenger_lvl4.vmdl",--蜡烛头矿车老鼠
h235 = "models/items/courier/chocobo/chocobo.vmdl", --迅捷陆行鸟
h236 = "models/items/courier/flightless_dod/flightless_dod.vmdl", --嘟嘟鸟
h237 = "models/items/courier/frostivus2018_courier_serac_the_seal/frostivus2018_courier_serac_the_seal.vmdl",
h238 = "models/items/courier/pangolier_squire/pangolier_squire.vmdl",
h239 = "models/hujing_wangyu/hujing.vmdl",
h240 = "models/items/courier/courier_ti9/courier_ti9_lvl3/courier_ti9_lvl3.vmdl",
h241 = "models/items/courier/axolotl/axolotl.vmdl",
h242 = "models/items/courier/snaggletooth_red_panda/snaggletooth_red_panda.vmdl",
h243 = "models/items/courier/xianhe_stork/xianhe_stork.vmdl",
--珍藏信使 pro
h301 = "models/items/courier/bookwyrm/bookwyrm.vmdl",
h302 = "models/items/courier/captain_bamboo/captain_bamboo.vmdl",
h303 = "models/items/courier/kanyu_shark/kanyu_shark.vmdl",
h304 = "models/items/courier/tory_the_sky_guardian/tory_the_sky_guardian.vmdl",
h305 = "models/items/courier/shroomy/shroomy.vmdl",
h306 = "models/items/courier/courier_janjou/courier_janjou.vmdl",
h307 = "models/items/courier/green_jade_dragon/green_jade_dragon.vmdl",
h308 = "models/courier/drodo/drodo.vmdl",
h309 = "models/courier/mech_donkey/mech_donkey.vmdl",
h310 = "models/courier/donkey_crummy_wizard_2014/donkey_crummy_wizard_2014.vmdl",
h311 = "models/courier/octopus/octopus.vmdl",
h312 = "models/items/courier/scribbinsthescarab/scribbinsthescarab.vmdl",
h313 = "models/courier/defense3_sheep/defense3_sheep.vmdl",
h314 = "models/items/courier/snapjaw/snapjaw.vmdl",
h315 = "models/items/courier/g1_courier/g1_courier.vmdl",
h316 = "models/courier/donkey_trio/mesh/donkey_trio.vmdl",
h317 = "models/items/courier/boris_baumhauer/boris_baumhauer.vmdl",
h318 = "models/courier/baby_rosh/babyroshan.vmdl",
h319 = "models/items/courier/bearzky/bearzky.vmdl",
h320 = "models/items/courier/defense4_radiant/defense4_radiant.vmdl",
h321 = "models/items/courier/defense4_dire/defense4_dire.vmdl",
h322 = "models/items/courier/onibi_lvl_20/onibi_lvl_20.vmdl",
h323 = "models/items/juggernaut/ward/fortunes_tout/fortunes_tout.vmdl", --招财猫
h324 = "models/items/courier/hermit_crab/hermit_crab_necro.vmdl", --螃蟹4
h325 = "models/items/courier/hermit_crab/hermit_crab_travelboot.vmdl", --螃蟹5
h326 = "models/items/courier/hermit_crab/hermit_crab_lotus.vmdl", --螃蟹6
h327 = "models/courier/donkey_ti7/donkey_ti7.vmdl",
h328 = "models/items/courier/shibe_dog_cat/shibe_dog_cat.vmdl", --天猫地狗new
h329 = "models/items/furion/treant/hallowed_horde/hallowed_horde.vmdl",--万圣树群new
h330 = "models/courier/flopjaw/flopjaw.vmdl",--大嘴咬人箱new
h331 = "models/courier/lockjaw/lockjaw.vmdl",--咬人箱洛克new
h332 = "models/items/courier/butch_pudge_dog/butch_pudge_dog.vmdl",--布狗new
h333 = "models/courier/turtle_rider/turtle_rider.vmdl",
h334 = "models/courier/smeevil_crab/smeevil_crab.vmdl",
h335 = "models/items/courier/mole_messenger/mole_messenger_lvl6.vmdl",--绿钻头矿车老鼠
h336 = "models/items/courier/amaterasu/amaterasu.vmdl", --天照大神
h337 = "models/qie/qie.vmdl",
h338 = "models/courier/f2p_courier/f2p_courier.vmdl",
h339 = "models/items/courier/azuremircourierfinal/azuremircourierfinal.vmdl",
h340 = "models/items/courier/courier_ti9/courier_ti9_lvl6/courier_ti9_lvl6.vmdl",
h341 = "models/bilibilitv/model/tv.vmdl",
h342 = "models/courier/baby_rosh/babyroshan.vmdl",
h343 = "models/courier/baby_rosh/babyroshan.vmdl",
h344 = "models/courier/baby_rosh/babyroshan.vmdl",
h345 = "models/courier/baby_winter_wyvern/baby_winter_wyvern.vmdl",
h346 = "models/courier/beetlejaws/mesh/beetlejaws.vmdl",
h347 = "models/courier/doom_demihero_courier/doom_demihero_courier.vmdl",
h348 = "models/courier/huntling/huntling.vmdl",
h349 = "models/courier/minipudge/minipudge.vmdl",
h350 = "models/courier/seekling/seekling.vmdl",
h351 = "models/courier/venoling/venoling.vmdl",
h352 = "models/items/courier/axolotl/axolotl.vmdl",
h353 = "models/items/courier/devourling/devourling.vmdl",
h354 = "models/courier/baby_rosh/babyroshan_elemental.vmdl",
h355 = "models/courier/baby_rosh/babyroshan_elemental.vmdl",
h399 = "models/courier/baby_rosh/babyroshan_winter18.vmdl",--姜饼肉山
--战队信使 master
h401 = "models/courier/navi_courier/navi_courier.vmdl",
h402 = "models/items/courier/courier_mvp_redkita/courier_mvp_redkita.vmdl",
h403 = "models/items/courier/ig_dragon/ig_dragon.vmdl",
h404 = "models/items/courier/lgd_golden_skipper/lgd_golden_skipper.vmdl",
h405 = "models/items/courier/vigilante_fox_red/vigilante_fox_red.vmdl",
h406 = "models/items/courier/virtus_werebear_t3/virtus_werebear_t3.vmdl",
h407 = "models/items/courier/throe/throe.vmdl",
h408 = "models/items/courier/vaal_the_animated_constructradiant/vaal_the_animated_constructradiant.vmdl",
h409 = "models/items/courier/vaal_the_animated_constructdire/vaal_the_animated_constructdire.vmdl",
h410 = "models/items/courier/carty/carty.vmdl",
h411 = "models/items/courier/carty_dire/carty_dire.vmdl",
h412 = "models/items/courier/dc_angel/dc_angel.vmdl",
h413 = "models/items/courier/dc_demon/dc_demon.vmdl",
h414 = "models/items/courier/vigilante_fox_green/vigilante_fox_green.vmdl",
h415 = "models/items/courier/bts_chirpy/bts_chirpy.vmdl",
h416 = "models/items/courier/krobeling/krobeling.vmdl",
h417 = "models/items/courier/jin_yin_black_fox/jin_yin_black_fox.vmdl",
h418 = "models/items/courier/jin_yin_white_fox/jin_yin_white_fox.vmdl",
h419 = "models/items/courier/fei_lian_blue/fei_lian_blue.vmdl",
h420 = "models/items/courier/gama_brothers/gama_brothers.vmdl",
h421 = "models/items/courier/onibi_lvl_21/onibi_lvl_21.vmdl",
h422 = "models/items/courier/wabbit_the_mighty_courier_of_heroes/wabbit_the_mighty_courier_of_heroes.vmdl", --小飞侠
h423 = "models/items/courier/hermit_crab/hermit_crab_octarine.vmdl", --螃蟹7
h424 = "models/items/courier/hermit_crab/hermit_crab_skady.vmdl", --螃蟹8
h425 = "models/items/courier/hermit_crab/hermit_crab_aegis.vmdl", --螃蟹9
h426 = "models/items/furion/treant_flower_1.vmdl",--绽放树精new
h427 = "models/courier/smeevil_magic_carpet/smeevil_magic_carpet.vmdl",
h428 = "models/items/courier/mole_messenger/mole_messenger_lvl7.vmdl",--绿钻头金矿车老鼠
h499 = "models/items/courier/krobeling_gold/krobeling_gold.vmdl",--金dp
h429 = "models/items/courier/nilbog/nilbog.vmdl",--贪小疯魔
h430 = "models/courier/frull/frull_courier.vmdl", --灵犀弗拉尔
h431 = "models/items/courier/sltv_10_courier/sltv_10_courier.vmdl", --黄油小生
h432 = "models/items/courier/nian_courier/nian_courier.vmdl", --年兽宝宝
h433 = "models/courier/baby_rosh/babyroshan_ti9.vmdl",
h434 = "models/items/courier/courier_ti9/courier_ti9_lvl7/courier_ti9_lvl7.vmdl",
h435 = "models/shudaixiong/model/shudaixiong/shudaixiong.vmdl",
h436 = "models/courier/baby_rosh/babyroshan.vmdl",
h437 = "models/courier/baby_rosh/babyroshan.vmdl",
h438 = "models/courier/baby_winter_wyvern/baby_winter_wyvern.vmdl",
h439 = "models/courier/flopjaw/flopjaw.vmdl",
h440 = "models/courier/juggernaut_dog/juggernaut_dog.vmdl",
h441 = "models/courier/smeevil_crab/smeevil_crab.vmdl",
h442 = "models/items/courier/axolotl/axolotl.vmdl",
h443 = "models/items/courier/fei_lian_blue/fei_lian_blue.vmdl",
h444 = "models/items/courier/wabbit_the_mighty_courier_of_heroes/wabbit_the_mighty_courier_of_heroes.vmdl",
h445 = "models/items/courier/wabbit_the_mighty_courier_of_heroes/wabbit_the_mighty_courier_of_heroes.vmdl",
h446 = "models/items/courier/wabbit_the_mighty_courier_of_heroes/wabbit_the_mighty_courier_of_heroes.vmdl",
}
local reimu_pet_skin =
{
h138 = 1,
h436 = 1,
h437 = 2,
h342 = 3,
h343 = 4,
h344 = 5,
h354 = 1,
h355 = 2,
h345 = 1,
h438 = 2,
h346 = 1,
h347 = 1,
h348 = 1,
h440 = 1,
h349 = 1,
h350 = 1,
h441 = 1,
h351 = 1,
h241 = 1,
h352 = 2,
h442 = 3,
h353 = 1,
h242 = 1,
h444 = 1,
h445 = 2,
h446 = 3,
h243 = 1,
h443 = 1,
h439 = 1,
}
local reimu_pet_size =
{
h000 = 1,
h001 = 1,
h002 = 1,
--普通信使 beginner
h101 = 1.1,
h102 = 1.1,
h103 = 1.1,
h104 = 1,
h105 = 1,
h106 = 1,
h107 = 1.2,
h108 = 1,
h109 = 1.1,
h110 = 1.1,
h111 = 1.1,
h112 = 1.2,
h113 = 1,
h114 = 1.2,
h115 = 1.2,
h116 = 1,
h117 = 1.3,
h118 = 1.1,
h119 = 1.3,
h120 = 1.3,
h121 = 1.1,
h122 = 1.1,
h123 = 1.2,
h124 = 1,
h125 = 1,
h126 = 1,
h127 = 1,
h128 = 1.1,
h129 = 1.2, --蠕行水母
h130 = 1, --驴法师new
h131 = 1, --丰臀公主new
h132 = 0.7,--焚牙树精new
h133 = 1.1,--机械咬人箱new
h134 = 1.1,--1级矿车老鼠
h135 = 1.1,
h136 = 1.1,
h137 = 1.15,
h138 = 1.15,
h139 = 2.5,
h199 = 1.5,
--小英雄信使 ameteur
h201 = 1.2,
h202 = 1.2,
h203 = 1.2,
h204 = 1.2,
h205 = 1.2,
h206 = 1.2,
h207 = 1.2,
h208 = 1.3,
h209 = 1.2,
h210 = 1.25,
h211 = 1.2,
h212 = 1.1,
h213 = 1,
h214 = 1.25,
h215 = 1.2,
h216 = 1.25,
h217 = 1.2,
h218 = 1.1,
h219 = 1.2,
h220 = 1.25,
h221 = 1.25,
h222 = 1.3,
h223 = 1.15,
h224 = 1.25,
h225 = 1.3, --胆小南瓜人
h226 = 1.3, --螃蟹1
h227 = 1.3, --螃蟹2
h228 = 1.2, --螃蟹3
h229 = 1.2, --竭智法师new
h230 = 1.3, --蓝心白隼new
h231 = 0.8,--莲花人new
h232 = 1.2,--甲虫咬人箱new
h233 = 1.2,
h234 = 1.2,--蜡烛头矿车老鼠
h235 = 1.2, --迅捷陆行鸟
h236 = 1.2, --嘟嘟鸟
h237 = 1.2,
h238 = 0.8,
h239 = 1.4,
h240 = 1.25,
h241 = 1.1,
h242 = 1.4,
h243 = 1.4,
--珍藏信使 pro
h301 = 1.3,
h302 = 1.3,
h303 = 1.3,
h304 = 1.35,
h305 = 1.3,
h306 = 1.3,
h307 = 1.3,
h308 = 1.3,
h309 = 1.2,
h310 = 1.2,
h311 = 1.25,
h312 = 1.3,
h313 = 1.3,
h314 = 1.3,
h315 = 1.25,
h316 = 1.3,
h317 = 1.4,
h318 = 1.3,
h319 = 1.3,
h320 = 1.3,
h321 = 1.3,
h322 = 1.3,
h323 = 1.1, --招财猫
h324 = 1.3, --螃蟹4
h325 = 1.25, --螃蟹5
h326 = 1.25, --螃蟹6
h327 = 1.25,
h328 = 1.3, --天猫地狗new
h329 = 0.9,--万圣树群new
h330 = 1.3,--大嘴咬人箱new
h331 = 1.25,--咬人箱洛克new
h332 = 1.3,--布狗new
h333 = 1.3,
h334 = 1.3,
h335 = 1.1,--绿钻头矿车老鼠
h336 = 1.15, --天照大神
h337 = 1.4,
h338 = 1.3,
h339 = 1.4,
h340 = 1.3,
h341 = 2.3,
h342 = 1.3,
h343 = 1.3,
h344 = 1.3,
h354 = 1.3,
h355 = 1.3,
h345 = 1.35,
h346 = 1.3,
h347 = 1.3,
h348 = 1.3,
h349 = 1.3,
h350 = 1.3,
h351 = 1.2,
h352 = 1.2,
h353 = 1.3,
h399 = 1.2,--姜饼肉山
--战队信使 master
h401 = 1.4,
h402 = 1.4,
h403 = 1.4,
h404 = 1.55,
h405 = 1.4,
h406 = 1.5,
h407 = 1.3,
h408 = 1.35,
h409 = 1.35,
h410 = 1.3,
h411 = 1.3,
h412 = 1.3,
h413 = 1.3,
h414 = 1.4,
h415 = 1.35,
h416 = 1.4,
h417 = 1.4,
h418 = 1.4,
h419 = 1.4,
h420 = 1.2,
h421 = 1.35,
h422 = 1.4, --小飞侠
h423 = 1.3, --螃蟹7
h424 = 1.3, --螃蟹8
h425 = 1.3, --螃蟹9
h426 = 1.1,--绽放树精new
h427 = 1.55,
h428 = 1.2,--绿钻头金矿车老鼠
h499 = 1.55,--金dp
h429 = 1.3,--贪小疯魔
h430 = 1.3, --灵犀弗拉尔
h431 = 1.2, --黄油小生
h432 = 1.3, --年兽宝宝
h433 = 1.35,
h434 = 1.4,
h435 = 1.0,
h438 = 1.45,
h439 = 1.35,
h440 = 1.2,
h441 = 1.4,
h442 = 1.3,
h444 = 1.4,
h445 = 1.4,
h446 = 1.4,
h443 = 1.4,
h436 = 1.4,
h437 = 1.4,
}
local reimu_pet_effect =
{
-- 未包含的
-- "e316", -- 一圈蓝色五角星
-- "e999", -- 皇冠
"e000", -- 无特效
"e101",
"e102",
"e103",
"e104",
"e107",
"e108",
"e111",
"e112",
"e113",
"e114",
"e201",
"e202",
"e203",
"e205",
"e210",
"e213",
"e214",
"e301",
"e302",
"e303",
"e304",
"e305",
"e306",
"e308",
"e309",
"e311",
"e312",
"e313",
"e315",
"e317",
"e319",
"e320",
"e321",
"e322",
"e401",
"e402",
"e403",
"e404",
"e405",
"e406",
"e407",
"e408",
"e409",
"e410",
"e451",
"e452",
"e453",
"e454",
"e455",
"e456",
"e457",
"e458",
"e459",
}
local courier_flyup_effect_list =
{
h208 = "effect/xukong/cour_rex_flying.vpcf",
h432 = "effect/nianshou/courier_nian_ambient.vpcf",
h499 = "effect/jin_dp/courier_krobeling_gold_ambient.vpcf",
h399 = "effect/jiangbing/1.vpcf",
h308 = "effect/drodo/1.vpcf",
h199 = "effect/gewugu/3.vpcf",
h239 = "effect/wangyu/1.vpcf",
h303 = "effect/douyu/2.vpcf",
h433 = "effect/roshan_ti9/1.vpcf",
h341 = "effect/music/1.vpcf",
h354 = "effect/lava_roshan/1.vpcf",
h355 = "effect/frost_roshan/ambient.vpcf",
h342 = "effect/darkmoon_roshan/1.vpcf",
h343 = "effect/sand_roshan/baby_roshan_desert_sands_ambient.vpcf",
h344 = "effect/biyu_roshan/1.vpcf",
h436 = "effect/golden_roshan/ambient.vpcf",
h437 = "effect/platinum_roshan/ambient.vpcf",
h438 = "effect/golden_ww/1.vpcf",
h439 = "effect/gold_angel/angels.vpcf",
h440 = "effect/liansai_dog/1.vpcf",
h441 = "effect/liansai_dog2/1.vpcf",
h446 = "effect/wabbit/lvl3.vpcf",
}
local courier_ground_effect_list =
{
h199 = "effect/gewugu/2.vpcf",
h303 = "particles/gem/brewmaster_drunken_haze_debuff_bubbles_2.vpcf",
}
function SetDefaultSkin(caster, index)
local skin =
{
{
"models/items/courier/courier_ti10_radiant/courier_ti10_radiant.vmdl",
"particles/econ/courier/courier_ti10/courier_ti10_lvl1_ambient.vpcf",
},
{
"models/items/courier/courier_ti10_radiant/courier_ti10_radiant_lvl2/courier_ti10_radiant_lvl2.vmdl",
"particles/econ/courier/courier_ti10/courier_ti10_lvl2_ambient.vpcf",
},
{
"models/items/courier/courier_ti10_radiant/courier_ti10_radiant_lvl3/courier_ti10_radiant_lvl3.vmdl",
"particles/econ/courier/courier_ti10/courier_ti10_lvl3_ambient.vpcf",
},
{
"models/items/courier/courier_ti10_radiant/courier_ti10_radiant_lvl4/courier_ti10_radiant_lvl4.vmdl",
"particles/econ/courier/courier_ti10/courier_ti10_lvl4_ambient.vpcf",
},
{
"models/items/courier/courier_ti10_radiant/courier_ti10_radiant_lvl5/courier_ti10_radiant_lvl5.vmdl",
"particles/econ/courier/courier_ti10/courier_ti10_lvl5_ambient.vpcf",
},
{
"models/items/courier/courier_ti10_radiant/courier_ti10_radiant_lvl6/courier_ti10_radiant_lvl6.vmdl",
"particles/econ/courier/courier_ti10/courier_ti10_lvl6_ambient.vpcf",
},
{
"models/items/courier/courier_ti10_radiant/courier_ti10_radiant_lvl7/courier_ti10_radiant_lvl7.vmdl",
"particles/econ/courier/courier_ti10/courier_ti10_lvl7_ambient.vpcf",
}
}
if index == nil or index < 1 or index > #skin then
index = RandomInt(1, #skin)
end
local model = skin[index][1]
local effect = skin[index][2]
caster:SetOriginalModel(model)
caster:SetModel(model)
caster:SetModelScale(1.0)
if caster.effect_name ~= nil then
caster:RemoveAbility(caster.effect_name)
caster:RemoveModifierByName('modifier_texiao_star')
caster.effect_name = nil
end
if caster.default_effect ~= nil then
ParticleManager:DestroyParticleSystem(caster.default_effect, true)
caster.default_effect = nil
end
local effectIndex = ParticleManager:CreateParticle(effect, PATTACH_ABSORIGIN_FOLLOW, caster)
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetOrigin())
caster.default_effect = effectIndex
-- ParticleManager:DestroyParticleSystem(effectIndex,false)
-- PATTACH_ABSORIGIN_FOLLOW
-- PATTACH_POINT_FOLLOW
-- PATTACH_WORLDORIGIN
end
function OnSpellStartReimuPet01(keys)
local caster = keys.caster
if caster.is_init ~= true then
caster.is_init = true
keys.ability:ApplyDataDrivenModifier(caster, caster, "modifier_reimu_pet_01_state", nil)
local playerid = caster:GetPlayerOwnerID()
local petLevel = GameRules.PlayerData[playerid].pet_level
caster.pet_level = petLevel
keys.ability:ApplyDataDrivenModifier(caster, caster, "modifier_reimu_pet_01_level", nil):SetStackCount(petLevel)
caster:CreatureLevelUp(petLevel - 1)
local keyTotal = GameRules.PlayerData[playerid].key_total or 0
if keyTotal > 0 then
local item = CreateItem("item_3121", nil, nil)
if item ~= nil then
item.owner_player_id = playerid
item:SetPurchaser(caster:GetOwner())
item:SetCurrentCharges(keyTotal)
caster:GetOwner():AddItem(item)
end
end
local key = GameRules.PlayerData[playerid].pet_model
if reimu_pet_model[key] == nil then
GameRules.PlayerData[playerid].pet_model = "h000"
key = "h000"
end
caster.pet_model = key
if key == "h000" then
SetDefaultSkin(caster)
elseif string.sub(key,1,4) == "h000" then
SetDefaultSkin(caster, table.keyindex(reimu_pet_model, key))
else
local model = reimu_pet_model[key]
caster:SetOriginalModel(model)
caster:SetModel(model)
caster:SetSkin(reimu_pet_skin[key] or 0)
caster:SetModelScale(math.min(2.5, (reimu_pet_size[key] or 1) * (1 + 0.05 * petLevel)))
local effect = GameRules.PlayerData[playerid].pet_effect or "e000"
if table.hasvalue(reimu_pet_effect, effect) then
caster.effect_name = effect
AddAbilityAndSetLevel(caster, effect)
if courier_flyup_effect_list[effect] ~= nil then
ShowCourierEffect(caster,1)
else
ShowCourierEffect(caster,2)
end
end
end
return
end
local index = (table.keyindex(reimu_pet_model, caster.pet_model) or 0) + 1
if index > math.min(caster.pet_level or 1, table.count(reimu_pet_model)) then
index = 1
end
if caster.default_effect ~= nil then
ParticleManager:DestroyParticleSystem(caster.default_effect,true)
caster.default_effect = nil
end
local key = table.getkey(reimu_pet_model, index)
caster.pet_model = key
if string.sub(key,1,4) == "h000" then
SetDefaultSkin(caster, index)
else
local model = reimu_pet_model[key]
caster:SetOriginalModel(model)
caster:SetModel(model)
caster:SetSkin(reimu_pet_skin[key] or 0)
caster:SetModelScale(math.min(2.5, (reimu_pet_size[key] or 1) * (1 + 0.05 * caster.pet_level)))
end
if tostring(PlayerResource:GetSteamID(caster:GetPlayerOwnerID())) == GameRules.GameData.admin then
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner() , "show_message", {msg="change_to_pet_model", duration=5, params={key = caster.pet_model}, color="#ff0"} )
end
end
function OnSpellStartReimuPet02(keys)
local caster = keys.caster
if string.sub(caster.pet_model,1,4) ~= "h000" and caster.default_effect ~= nil then
ParticleManager:DestroyParticleSystem(caster.default_effect,true)
caster.default_effect = nil
end
if caster.effect_name ~= nil then
caster:RemoveAbility(caster.effect_name)
caster:RemoveModifierByName('modifier_texiao_star')
end
local index = 0
if caster.effect_name == nil then
index = 1
else
for k,v in ipairs(reimu_pet_effect) do
if v == caster.effect_name then
index = k + 1
break
end
end
if index > math.min(caster.pet_level or 1, #reimu_pet_effect) then
index = 1
end
end
local effect = reimu_pet_effect[index]
caster.effect_name = effect
AddAbilityAndSetLevel(caster, effect)
if courier_flyup_effect_list[effect] ~= nil then
ShowCourierEffect(caster,1)
else
ShowCourierEffect(caster,2)
end
if tostring(PlayerResource:GetSteamID(caster:GetPlayerOwnerID())) == GameRules.GameData.admin then
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner() , "show_message", {msg="change_to_pet_effect", duration=5, params={key = caster.effect_name}, color="#ff0"} )
end
end
function OnSpellStartReimuPet03(keys)
local caster = keys.caster
local playerid = caster:GetPlayerOwnerID()
GameRules.PlayerData[playerid].pet_model = caster.pet_model
GameRules.PlayerData[playerid].pet_effect = caster.effect_name
Service:SavePetCustom(playerid)
UnitStunTarget(caster,caster,6.0)
local vecCaster = caster:GetOrigin()
local count = 4
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_patchouli_04/ability_patchouli_04.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, vecCaster + Vector(0,0,256))
ParticleManager:SetParticleControl(effectIndex, 1, vecCaster + Vector(0,0,256))
ParticleManager:SetParticleControl(effectIndex, 3, vecCaster + Vector(0,0,256))
caster:SetContextThink(DoUniqueString("OnSpellStartReimuPet03"),
function()
count = count * 2
local radius = math.min(128,count)
ParticleManager:SetParticleControl(effectIndex, 14, Vector(radius,0,0))
if count > 100 then
ParticleManager:DestroyParticleSystemTimeFalse(effectIndex,3.0)
return nil
end
return 0.5
end,
0.5)
local effectIndex = ParticleManager:CreateParticle("particles/heroes/remilia/ability_remilia_04_laser.vpcf",PATTACH_CUSTOMORIGIN,caster)
ParticleManager:SetParticleControl(effectIndex, 0, vecCaster+Vector(0,0,700))
ParticleManager:SetParticleControl(effectIndex, 1, vecCaster+Vector(800,0,800))
ParticleManager:SetParticleControl(effectIndex, 2, vecCaster+Vector(0,0,0))
ParticleManager:SetParticleControl(effectIndex, 3, vecCaster+Vector(-800,0,800))
ParticleManager:SetParticleControl(effectIndex, 4, vecCaster+Vector(0,0,1600))
ParticleManager:SetParticleControl(effectIndex, 6, vecCaster)
ParticleManager:DestroyParticleSystem(effectIndex,false)
local effectIndexSmoke = ParticleManager:CreateParticle("particles/heroes/remilia/ability_remilia_04_laser_rocket.vpcf",PATTACH_CUSTOMORIGIN,caster)
ParticleManager:SetParticleControl(effectIndexSmoke, 0, vecCaster+Vector(0,0,700))
ParticleManager:SetParticleControl(effectIndexSmoke, 1, Vector(1,0,0))
ParticleManager:SetParticleControl(effectIndexSmoke, 2, Vector(-1,0,0))
ParticleManager:SetParticleControl(effectIndexSmoke, 3, Vector(0,0,0.5))
ParticleManager:SetParticleControl(effectIndexSmoke, 4, Vector(0,0,-1))
ParticleManager:DestroyParticleSystem(effectIndexSmoke,false)
end
function OnSpellStartReimuPet04(keys)
local caster = keys.caster
local playerid = caster:GetPlayerOwnerID()
local hero = caster:GetOwner()
if hero:GetNumItemsInInventory() >= THTD_MAX_ITEM_SLOT then
CustomGameEventManager:Send_ServerToPlayer(hero:GetPlayerOwner(), "display_custom_error", {msg="not_enough_item_slot"})
return
end
if tostring(PlayerResource:GetSteamID(caster:GetPlayerOwnerID())) == GameRules.GameData.admin then
local item = hero:FindItemInInventory("item_3121")
if item ~= nil then
item:SetCurrentCharges(item:GetCurrentCharges() + 1)
else
item = CreateItem("item_3121", nil, nil)
if item ~= nil then
item.owner_player_id = playerid
item:SetPurchaser(hero)
hero:AddItem(item)
-- local vHitLoc = caster:GetAttachmentOrigin(caster:ScriptLookupAttachment("attach_hitloc"))
-- local drop = CreateItemOnPositionSync(vHitLoc, item)
-- item:LaunchLootInitialHeight(false, vHitLoc.z, vHitLoc.z+200, 1.0, GetGroundPosition(caster:GetOwner():GetAbsOrigin() + caster:GetOwner():GetForwardVector() * 100, caster:GetOwner()))
end
end
caster:EmitSound(reimu_pet_sound[RandomInt(1, #reimu_pet_sound)])
CustomGameEventManager:Send_ServerToPlayer(hero:GetPlayerOwner(), "show_message", {msg="key_made_tip", duration=3, params={}, color="#ff0"})
ParticleManager:DestroyParticleSystem(hero.thtd_emoji_effect,true)
hero.thtd_emoji_effect = ParticleManager:CreateParticle("particles/thtd/emoji/thtd_msg_hongliange.vpcf", PATTACH_OVERHEAD_FOLLOW, hero)
ParticleManager:SetParticleControlEnt(hero.thtd_emoji_effect , 0, hero, PATTACH_OVERHEAD_FOLLOW, "attach_hitloc", Vector(0,0,0), true) --灵梦用 attach_emoji
ParticleManager:SetParticleControl(hero.thtd_emoji_effect, 3, Vector(1,0,0))
ParticleManager:DestroyParticleSystemTime(hero.thtd_emoji_effect,5.0)
return
end
if GameRules.PlayerData[playerid]["point"] == nil or GameRules.PlayerData[playerid]["point"] < keys.point then
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner() , "display_custom_error", {msg="not_enough_game_point"} )
return
end
caster:EmitSound(reimu_pet_sound[RandomInt(1, #reimu_pet_sound)])
Service:BuyMagicKey(playerid, 1)
end
local model_tree =
{
-- "maps/journey_assets/props/trees/journey_armandpine/journey_armandpine_01.vmdl",
-- "maps/journey_assets/props/trees/journey_armandpine/journey_armandpine_02.vmdl",
-- "maps/journey_assets/props/trees/journey_maple/journey_maple02.vmdl",
-- "maps/jungle_assets/trees/kapok/export/kapok_002.vmdl",
-- "maps/jungle_assets/trees/kapok/export/kapok_003.vmdl",
-- "maps/jungle_assets/trees/kapok/export/kapok_004.vmdl",
-- "models/props_tree/dire_tree006.vmdl",
-- "models/props_tree/palm_01.vmdl",
-- "models/props_tree/palm_02b.vmdl",
-- "models/props_tree/palm_02c.vmdl",
-- "models/props_tree/palm_03_inspector.vmdl",
"models/props_tree/frostivus_tree.vmdl", -- 圣诞树
-- "models/props_tree/newbloom_tree.vmdl", -- 新春树
}
function OnSpellStartReimuPet05(keys)
local caster = keys.caster
local targetPoint = keys.target_points[1]
caster:EmitSound("UI.Aowu")
if targetPoint.y > 415 and targetPoint.y < 2000 then
local y = 2000
if (2000-targetPoint.y) > (targetPoint.y-415) then y = 415 end
targetPoint = Vector(targetPoint.x, y, targetPoint.z)
elseif targetPoint.y > -2000 and targetPoint.y < -415 then
local y = -2000
if math.abs(-2000-targetPoint.y) > math.abs(-415-targetPoint.y) then y = -415 end
targetPoint = Vector(targetPoint.x, y, targetPoint.z)
end
if targetPoint.x > 3755 and targetPoint.x < 4470 then
targetPoint = Vector(3755, targetPoint.y, targetPoint.z)
elseif targetPoint.x < -3755 and targetPoint.x > -4470 then
targetPoint = Vector(-3755, targetPoint.y, targetPoint.z)
end
if GetDistanceBetweenTwoVec2D(caster:GetAbsOrigin(), targetPoint) <= 200 then
caster.pet_point = nil
if caster.pet_tree ~= nil then UTIL_Remove(caster.pet_tree) end
caster.pet_tree = nil
else
caster.pet_point = targetPoint
if caster.pet_tree ~= nil then UTIL_Remove(caster.pet_tree) end
caster.pet_tree = CreateTempTreeWithModel(targetPoint, 36000, model_tree[RandomInt(1, #model_tree)])
end
end
function ShowCourierEffect(hero,type)
if hero.flyup_effect ~= nil then
ParticleManager:DestroyParticle(hero.flyup_effect,true)
end
if hero.ground_effect ~= nil then
ParticleManager:DestroyParticle(hero.ground_effect,true)
end
local key = table.getkey(reimu_pet_model, hero.model_index)
if type == 1 then
--陆地特效
if key ~= nil and courier_ground_effect_list[key] ~= nil then
--陆地特效
local ground_effect = courier_ground_effect_list[key]
hero.ground_effect = PlayParticleOnUnitUntilDeath({
caster = hero,
p = ground_effect,
})
end
end
if type == 2 then
--飞行特效
if key ~= nil and courier_flyup_effect_list[key] ~= nil then
--飞行特效
local flyup_effect = courier_flyup_effect_list[key]
hero.flyup_effect = PlayParticleOnUnitUntilDeath({
caster = hero,
p = flyup_effect,
})
end
end
end
function PlayParticleOnUnitUntilDeath(keys)
local p = keys.p
local u = keys.caster
if u == nil then
return
end
local pos = keys.pos or PATTACH_ABSORIGIN_FOLLOW
local pp = ParticleManager:CreateParticle(p, pos, u)
ParticleManager:SetParticleControlEnt( pp, 0, u, pos, nil, u:GetOrigin(), true );
ParticleManager:SetParticleControlEnt( pp, 1, u, pos, nil, u:GetOrigin(), true );
ParticleManager:SetParticleControlEnt( pp, 2, u, pos, nil, u:GetOrigin(), true );
ParticleManager:SetParticleControlEnt( pp, 3, u, pos, nil, u:GetOrigin(), true );
ParticleManager:SetParticleControlEnt( pp, 4, u, pos, nil, u:GetOrigin(), true );
ParticleManager:SetParticleControlEnt( pp, 5, u, pos, nil, u:GetOrigin(), true );
ParticleManager:SetParticleControlEnt( pp, 6, u, pos, nil, u:GetOrigin(), true );
u:SetContextThink(DoUniqueString("dota_timer"),
function()
if GameRules:IsGamePaused() then return 0.1 end
if u == nil or u:IsNull() == true or u:IsAlive() == false then
if pp ~= nil then
ParticleManager:DestroyParticle(pp,true)
end
return
end
if pp == nil then
return
end
return 0.1
end,
0.1)
return pp
end
function SetCourier(hero, onduty_hero, onduty_hero_effect)
local onduty_hero_model = GameRules:GetGameModeEntity().sm_hero_list[onduty_hero]
local onduty_hero_skin = GameRules:GetGameModeEntity().sm_hero_list_skin[onduty_hero] or 0
hero:SetOriginalModel(onduty_hero_model)
hero:SetModel(onduty_hero_model)
hero:SetSkin(onduty_hero_skin)
hero.init_model_scale = GameRules:GetGameModeEntity().sm_hero_size[onduty_hero] or 1
hero:SetModelScale(hero.init_model_scale)
hero.ori_model = onduty_hero_model
hero.ori_skin = onduty_hero_skin
if hero.effect ~= nil then
hero:RemoveAbility(hero.effect)
hero:RemoveModifierByName('modifier_texiao_star')
end
if onduty_hero_effect ~= 'e000' then
if string.find(GameRules:GetGameModeEntity().effect_list,onduty_hero_effect) then
AddAbilityAndSetLevel(hero,onduty_hero_effect)
hero.effect = onduty_hero_effect
end
end
ShowCourierEffect(hero,1)
hero.onduty_hero = onduty_hero
end

View File

@@ -0,0 +1,146 @@
function OnReisen01AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
ReisenRepelUnit(caster, target)
end
function ReisenRepelUnit(caster, target)
if target.thtd_is_fearing == true then return end
if target.next_move_point ~= nil and target.thtd_is_feared_by_reisen_01 ~= true then
target.thtd_is_feared_by_reisen_01 = true
target.thtd_is_fearing = true
local current_next_move_point = target.next_move_point
target.next_move_point = target:GetOrigin() - target:GetForwardVector() * 500
target:EmitSound("Hero_Sniper.ProjectileImpact")
local count = 20
target:SetContextThink(DoUniqueString("thtd_reisen01_move_next_point"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if not IsValidAlive(target) then
return nil
end
count = count - 1
if count <= 0 or THTD_IsValid(caster) == false then
target.next_move_point = current_next_move_point
target.thtd_is_fearing = false
return nil
end
return 0.1
end,
0)
end
end
function OnReisen02AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if caster.thtd_reisen_02_illusion_count == nil then
caster.thtd_reisen_02_illusion_count = 0
end
if caster.thtd_reisen_02_illusion_count < keys.max_count and RollPercentage(keys.chance) then
caster:EmitSound("Sound_THTD.thtd_reisen_02")
local illusion = CreateUnitByName(
"reisen_illusion",
caster:GetOrigin() + RandomVector(150),
false,
caster:GetOwner(),
caster:GetOwner(),
caster:GetTeam()
)
illusion.thtd_spawn_unit_owner = caster
illusion:SetControllableByPlayer(caster:GetPlayerOwnerID(), true)
local count = 0
keys.ability:ApplyDataDrivenModifier(caster, illusion, "modifier_reisen_02_illusion", nil)
illusion:SetBaseDamageMax(caster:THTD_GetAttack())
illusion:SetBaseDamageMin(caster:THTD_GetAttack())
illusion:MoveToPositionAggressive(illusion:GetOrigin() + illusion:GetForwardVector() * 100)
illusion:SetContextThink(DoUniqueString("thtd_reisen02_illusion"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if count > 20 then
illusion:AddNoDraw()
illusion:ForceKill(true)
caster.thtd_reisen_02_illusion_count = caster.thtd_reisen_02_illusion_count - 1
return nil
end
count = count + 1
return 0.5
end,
0)
caster.thtd_reisen_02_illusion_count = caster.thtd_reisen_02_illusion_count + 1
end
end
function OnReisen03SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
caster:EmitSound("Sound_THTD.thtd_reisen_03")
if caster.thtd_reisen_02_illusion_count == nil then
caster.thtd_reisen_02_illusion_count = 0
end
local targets = THTD_FindUnitsInRadius(caster,target:GetOrigin(),keys.range)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * (1 + caster.thtd_reisen_02_illusion_count * keys.damage_up/100)
local playerid = caster:GetPlayerOwnerID()
if GameRules.player_bb_buff[playerid]["item_3030"] > 0 then
damage = damage * (1 + GameRules.player_bb_buff[playerid]["item_3030"]/100)
end
for k,v in pairs(targets) do
Reisen03RepelUnit(caster, v)
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_reisen/ability_reisen_03.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetOrigin())
ParticleManager:SetParticleControl(effectIndex, 1, target:GetOrigin())
ParticleManager:SetParticleControl(effectIndex, 3, target:GetOrigin())
ParticleManager:SetParticleControl(effectIndex, 9, caster:GetOrigin())
ParticleManager:DestroyParticleSystemTime(effectIndex,2.0)
end
function Reisen03RepelUnit(caster, target)
if target.thtd_is_fearing == true then return end
if target.next_move_point ~= nil then
target.thtd_is_feared_by_reisen_01 = true
target.thtd_is_fearing = true
local current_next_move_point = target.next_move_point
target.next_move_point = target:GetOrigin() - target:GetForwardVector() * 500
target:EmitSound("Hero_Sniper.ProjectileImpact")
local count = 20
target:SetContextThink(DoUniqueString("thtd_reisen01_move_next_point"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if not IsValidAlive(target) then
return nil
end
count = count - 1
if count <= 0 or THTD_IsValid(caster) == false then
target.next_move_point = current_next_move_point
target.thtd_is_fearing = false
return nil
end
return 0.1
end,
0)
end
end

View File

@@ -0,0 +1,254 @@
function OnRemilia01SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local ability = keys.ability
local targetPoint = keys.target:GetOrigin()
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_remilia/ability_remilia_03_end.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 3, caster:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
effectIndex = ParticleManager:CreateParticle("particles/heroes/moluo/abiilty_moluo_014.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
ParticleManager:DestroyParticleSystem(effectIndex,false)
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.range)
local damage = caster:THTD_GetAbilityPowerDamage(ability)
local powerBonus = #targets * keys.power_bonus
local duration_time = math.floor(keys.duration_time * 100 + 0.5) / 100
for k,target in pairs(targets) do
local effectIndex = ParticleManager:CreateParticle("particles/heroes/moluo/ability_moluo01_explosion_vip.vpcf",PATTACH_CUSTOMORIGIN,caster)
ParticleManager:SetParticleControlEnt(effectIndex , 0, caster, 5, "follow_origin", Vector(0,0,0), true)
ParticleManager:SetParticleControlEnt(effectIndex , 1, caster, 5, "follow_origin", Vector(0,0,0), true)
ParticleManager:SetParticleControlEnt(effectIndex , 2, target, 5, "follow_origin", Vector(0,0,0), true)
ParticleManager:SetParticleControlForward(effectIndex, 2, caster:GetForwardVector())
ParticleManager:SetParticleControlEnt(effectIndex , 5, caster, 5, "follow_origin", Vector(0,0,0), true)
ParticleManager:SetParticleControlEnt(effectIndex , 7, caster, 5, "follow_origin", Vector(0,0,0), true)
ParticleManager:SetParticleControlEnt(effectIndex , 10, caster, 5, "follow_origin", Vector(0,0,0), true)
local crit = 1
if target:HasModifier("modifier_remilia_03_debuff") then
crit = 10
end
local damage_table={
ability = ability,
victim=target,
attacker=caster,
damage=damage * crit,
damage_type=ability:GetAbilityDamageType(),
damage_flags=ability:GetAbilityTargetFlags()
}
UnitDamageTarget(damage_table)
OnRemilia02SpellStart(caster)
end
if powerBonus > 0 then
caster:THTD_AddBasePower(powerBonus)
caster:SetContextThink(DoUniqueString("dota_timer"),
function()
if GameRules:IsGamePaused() then return 0.1 end
caster:THTD_AddBasePower(-powerBonus)
return nil
end,
duration_time)
end
end
function OnRemilia02SpellStart(caster)
local step = caster:GetAbilityValue("thtd_remilia_02", "damage_up")
local maxUp = caster:GetAbilityValue("thtd_remilia_02", "max_up")
local duration = caster:GetAbilityValue("thtd_remilia_02", "duration_time")
if caster.thtd_remilia_02_outgoing == nil then
caster.thtd_remilia_02_outgoing = 0
end
local count = math.min(step, maxUp - caster.thtd_remilia_02_outgoing)
if count > 0 then
caster:AddDamageOutgoingMagical(count)
caster.thtd_remilia_02_outgoing = caster.thtd_remilia_02_outgoing + count
caster:SetContextThink(DoUniqueString("modifier_reimilia_02_buff_count"),
function()
if GameRules:IsGamePaused() then return 0.03 end
caster:AddDamageOutgoingMagical(-count)
caster.thtd_remilia_02_outgoing = caster.thtd_remilia_02_outgoing - count
return nil
end,
duration)
end
end
function OnRemilia03SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local targetPoint = keys.target_points[1]
local forward = (keys.target_points[1] - caster:GetOrigin()):Normalized()
local effectIndex = ParticleManager:CreateParticle("particles/heroes/remilia/ability_remilia_03_spark.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetOrigin() + Vector(forward.x * 92,forward.y * 92,150))
ParticleManager:SetParticleControl(effectIndex, 8, Vector(forward.x,forward.y,0))
ParticleManager:DestroyParticleSystem(effectIndex,false)
effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_remilia/ability_remilia_03_end.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 3, caster:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
local info =
{
Ability = keys.ability,
EffectName = "particles/heroes/remilia/ability_remilia_01.vpcf",
vSpawnOrigin = caster:GetOrigin()+Vector(0,0,30),
fDistance = keys.distance,
fStartRadius = 300,
fEndRadius = 300,
Source = caster,
bHasFrontalCone = false,
bReplaceExisting = false,
iUnitTargetTeam = DOTA_UNIT_TARGET_TEAM_ENEMY,
iUnitTargetFlags = DOTA_UNIT_TARGET_FLAG_NONE,
iUnitTargetType = DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC,
fExpireTime = GameRules:GetGameTime() + 10.0,
bDeleteOnHit = false,
vVelocity = forward * 4000,
bProvidesVision = true,
iVisionRadius = 1000,
iVisionTeamNumber = caster:GetTeamNumber()
}
local projectile = ProjectileManager:CreateLinearProjectile(info)
ParticleManager:DestroyLinearProjectileSystem(projectile,false)
end
function OnRemilia03SpellHit(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local targetPoint = target:GetOrigin()
local effectIndex = ParticleManager:CreateParticle("particles/heroes/remilia/ability_remilia_01_explosion.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
ParticleManager:SetParticleControl(effectIndex, 1, targetPoint)
ParticleManager:SetParticleControl(effectIndex, 3, targetPoint)
ParticleManager:SetParticleControl(effectIndex, 5, targetPoint)
ParticleManager:DestroyParticleSystem(effectIndex,false)
if caster.thtd_remilia_03_chance_count == nil then
caster.thtd_remilia_03_chance_count = 0
end
local chance = caster:GetAbilityValue("thtd_remilia_04", "chance")
local success = RollPercentage(chance)
if caster.thtd_remilia_03_chance_count >= 100/chance then
success = true
end
if success then
caster.thtd_remilia_03_chance_count = 0
else
caster.thtd_remilia_03_chance_count = caster.thtd_remilia_03_chance_count + 1
end
local damage = 0
local ability4 = caster:FindAbilityByName("thtd_remilia_04")
if ability4:GetLevel() > 0 and success then
damage = ability4:GetSpecialValueFor("power_damage_03") * caster:THTD_GetStarDamage()
if not target:HasModifier("modifier_remilia_03_debuff") then
keys.ability:ApplyDataDrivenModifier(caster, target, "modifier_remilia_03_debuff",nil)
end
else
damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
end
local crit = 1
if target:HasModifier("modifier_remilia_03_debuff") then
crit = 10
end
local damage_table = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = damage * crit,
damage_type = keys.ability:GetAbilityDamageType(),
amage_flags = keys.ability:GetAbilityTargetFlags()
}
UnitDamageTarget(damage_table)
OnRemilia02SpellStart(caster)
end
function OnRemilia03Created(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
target:RemoveMagicalResist()
target:RemovePhysicalArmor()
local bonus = caster:GetAbilityValue("thtd_remilia_04", "damage_up")
target:AddDamageIncomingPhysical(bonus, "thtd_remilia_03_damage_up")
target:AddDamageIncomingMagical(bonus, "thtd_remilia_03_damage_up")
end
function OnRemilia03Destroy(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.unit
local targetPoint = target:GetOrigin()
local effectIndex = ParticleManager:CreateParticle("particles/heroes/remilia/ability_remilia_04_laser.vpcf",PATTACH_CUSTOMORIGIN,caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint+Vector(0,0,700))
ParticleManager:SetParticleControl(effectIndex, 1, targetPoint+Vector(800,0,800))
ParticleManager:SetParticleControl(effectIndex, 2, targetPoint+Vector(0,0,0))
ParticleManager:SetParticleControl(effectIndex, 3, targetPoint+Vector(-800,0,800))
ParticleManager:SetParticleControl(effectIndex, 4, targetPoint+Vector(0,0,1600))
ParticleManager:SetParticleControl(effectIndex, 6, targetPoint)
ParticleManager:DestroyParticleSystem(effectIndex,false)
local effectIndexSmoke = ParticleManager:CreateParticle("particles/heroes/remilia/ability_remilia_04_laser_rocket.vpcf",PATTACH_CUSTOMORIGIN,caster)
ParticleManager:SetParticleControl(effectIndexSmoke, 0, targetPoint+Vector(0,0,700))
ParticleManager:SetParticleControl(effectIndexSmoke, 1, Vector(1,0,0))
ParticleManager:SetParticleControl(effectIndexSmoke, 2, Vector(-1,0,0))
ParticleManager:SetParticleControl(effectIndexSmoke, 3, Vector(0,0,0.5))
ParticleManager:SetParticleControl(effectIndexSmoke, 4, Vector(0,0,-1))
ParticleManager:DestroyParticleSystem(effectIndexSmoke,false)
local ability = caster:FindAbilityByName("thtd_remilia_04")
local time = math.floor(ability:GetSpecialValueFor("duration_time") * 100 + 0.5) / 100
local tick = math.floor(ability:GetSpecialValueFor("tick_time") * 100 + 0.5) / 100
local range = ability:GetSpecialValueFor("range")
caster:EmitSound("Sound_THTD.thtd_remilia_04")
caster:SetContextThink(DoUniqueString("ability_remilia_03_effect_destroy"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if time <= 0 then return nil end
if not THTD_IsValid(caster) then
ParticleManager:DestroyParticleSystem(effectIndex,true)
ParticleManager:DestroyParticleSystem(effectIndexSmoke,true)
return nil
end
local damage = caster:THTD_GetAbilityPowerDamage(ability)
local targets = THTD_FindUnitsInRadius(caster,targetPoint,range)
for k,v in pairs(targets) do
local crit = 1
if v:HasModifier("modifier_remilia_03_debuff") then
crit = 10
end
local damage_table={
ability = ability,
victim = v,
attacker = caster,
damage = damage * crit,
damage_type = ability:GetAbilityDamageType(),
damage_flags = ability:GetAbilityTargetFlags()
}
UnitDamageTarget(damage_table)
end
OnRemilia02SpellStart(caster)
time = time - tick
return tick
end,
0)
end

View File

@@ -0,0 +1,111 @@
function OnRin01SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target:GetOrigin()
caster:EmitSound("Sound_THTD.thtd_rin_01")
local info =
{
Ability = keys.ability,
EffectName = "particles/heroes/rin/ability_rin_01.vpcf",
vSpawnOrigin = targetPoint,
fDistance = 1000,
fStartRadius = 400,
fEndRadius = 400,
Source = caster,
bHasFrontalCone = false,
bReplaceExisting = false,
iUnitTargetTeam = DOTA_UNIT_TARGET_TEAM_ENEMY,
iUnitTargetFlags = DOTA_UNIT_TARGET_FLAG_NONE,
iUnitTargetType = DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC,
fExpireTime = GameRules:GetGameTime() + 10.0,
bDeleteOnHit = false,
vVelocity = -keys.target:GetForwardVector() * 1500,
bProvidesVision = true,
iVisionRadius = 1000,
iVisionTeamNumber = caster:GetTeamNumber()
}
projectile = ProjectileManager:CreateLinearProjectile(info)
Rin01Wheel(keys)
end
function Rin01Wheel(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local origin = keys.target:GetOrigin()
local forward = -keys.target:GetForwardVector()
local effectIndex = ParticleManager:CreateParticle("particles/heroes/rin/ability_rin_01_projectile.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, origin)
ParticleManager:SetParticleControlForward(effectIndex, 0 , forward)
local count = 0
caster:SetContextThink(DoUniqueString("ability_rin_01_wheel_move"),
function ()
if GameRules:IsGamePaused() then return 0.03 end
if count < 23 then
origin = origin + forward * 45
ParticleManager:SetParticleControl(effectIndex, 0, origin)
count = count + 1
else
ParticleManager:DestroyParticleSystem(effectIndex,false)
return nil
end
return 0.03
end,
0.03)
end
function OnRin01ProjectileHit(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
local DamageTable = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
if target~=nil and target:IsNull()== false and target:IsAlive() and target:HasModifier("modifier_rin_01_debuff")==false then
keys.ability:ApplyDataDrivenModifier(caster, target, "modifier_rin_01_debuff", nil)
end
end
function OnRin01Death(keys)
if keys.caster_entindex==nil then return end
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.unit
if caster:FindAbilityByName("thtd_rin_02"):GetLevel() < 1 then return end
target:EmitSound("Hero_Nevermore.Shadowraze")
local effectIndex = ParticleManager:CreateParticle("particles/heroes/moluo/abiilty_moluo_014.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, target:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
local hp_damage = caster:GetAbilityValue("thtd_rin_02", "hp_damage", true)
local power_damage = caster:GetAbilityValue("thtd_rin_02", "power_damage")
local range = caster:GetAbilityValue("thtd_rin_02", "range")
local damage = math.min(target:GetMaxHealth() * hp_damage, caster:THTD_GetStarDamage()*power_damage)
local targets = THTD_FindUnitsInRadius(caster,target:GetOrigin(),range)
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
end

View File

@@ -0,0 +1,343 @@
function OnRumia01AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
local DamageTable = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
function OnRumia01Kill(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if caster.rumia_01_bonus == nil then
caster.rumia_01_bonus = 0
end
if caster:IsPower999() then
if caster.rumia_01_bonus < keys.max_bonus * 10 then
caster.rumia_01_bonus = caster.rumia_01_bonus + 1
caster:THTD_AddBasePower(1)
end
else
if caster.rumia_01_bonus < keys.max_bonus then
caster.rumia_01_bonus = caster.rumia_01_bonus + 1
caster:THTD_AddBasePower(1)
elseif caster.rumia_01_bonus > keys.max_bonus then
caster:THTD_AddBasePower(-(caster.rumia_01_bonus - keys.max_bonus))
caster.rumia_01_bonus = keys.max_bonus
end
end
end
function OnRumia02AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if keys.ability:GetLevel() < 1 then return end
if caster.rumia_02_attack_count == nil then
caster.rumia_02_attack_count = 0
end
local powerCount = 0
local pv = caster:GetAbilityPowerValue("thtd_rumia_02")
if pv ~= nil then
powerCount = pv[1]
end
caster.rumia_02_attack_count = caster.rumia_02_attack_count + 1
if caster.rumia_02_attack_count >= (keys.max_count - powerCount) then
RumiaProjectileStart(keys)
caster.rumia_02_attack_count = 0
end
end
function RumiaProjectileStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
caster:EmitSound("Sound_THTD.thtd_rumia_01")
for i=1,12 do
local forwardCos = caster:GetForwardVector().x
local forwardSin = caster:GetForwardVector().y
local angle = (39 - 6.5 * i) / 180 * math.pi
local forward = Vector( math.cos(angle)*forwardCos - math.sin(angle)*forwardSin,
forwardSin*math.cos(angle) + forwardCos*math.sin(angle),0)
local info =
{
Ability = keys.ability,
EffectName = "particles/heroes/rumia/ability_rumia_02_projectile.vpcf",
vSpawnOrigin = caster:GetOrigin() + forward * 500 - caster:GetForwardVector() * 500 + Vector(0,0,128),
fDistance = 800,
fStartRadius = 150,
fEndRadius = 150,
Source = caster,
bHasFrontalCone = false,
bReplaceExisting = false,
iUnitTargetTeam = DOTA_UNIT_TARGET_TEAM_ENEMY,
iUnitTargetFlags = DOTA_UNIT_TARGET_FLAG_NONE,
iUnitTargetType = DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC,
fExpireTime = GameRules:GetGameTime() + 10.0,
bDeleteOnHit = true,
vVelocity = caster:GetForwardVector() * 1800,
bProvidesVision = true,
iVisionRadius = 1000,
iVisionTeamNumber = caster:GetTeamNumber()
}
if caster:THTD_IsTowerEx() == true then
info.EffectName = "particles/heroes/rumia/ability_rumia_02_ex_projectile.vpcf"
end
local projectile = ProjectileManager:CreateLinearProjectile(info)
ParticleManager:DestroyLinearProjectileSystem(projectile,false)
end
end
function OnRumiaProjectileHit(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability, 1)
if caster:THTD_IsTowerEx() == true then
damage = caster:THTD_GetAbilityPowerDamage(keys.ability, 2)
end
if caster:IsPower666() then damage = damage * 10 end
local DamageTable = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
function OnRumia03AttackLanded(keys)
if keys.ability:GetLevel()<1 then return end
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if target.thtd_damage_lock == true then return end
if target:GetHealthPercent() > 70 and RollPercentage(keys.chance) then
local targetPoint = target:GetOrigin()
keys.ability:ApplyDataDrivenModifier(caster,target,"modifier_rumia_03_pause",{})
local pointRad = GetRadBetweenTwoVec2D(caster:GetOrigin(),targetPoint)
local randomPi = -2*math.pi
if RandomInt(0,1) == 0 then
randomPi = -2*math.pi
else
randomPi = 2*math.pi
end
local forwardVec = Vector(math.cos(pointRad+randomPi), math.sin(pointRad+randomPi),RandomFloat(0,1))
local projectileTable = {
Ability = keys.ability,
EffectName = "particles/heroes/thtd_rumia/ability_rumia_03.vpcf",
vSpawnOrigin = caster:GetOrigin(),
vSpawnOriginNew = caster:GetOrigin(),
fDistance = 5000,
fStartRadius = 60,
fEndRadius = 60,
Source = caster,
bHasFrontalCone = false,
bRepalceExisting = false,
iUnitTargetTeams = "DOTA_UNIT_TARGET_TEAM_ENEMY",
iUnitTargetTypes = "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_CREEP",
iUnitTargetFlags = "DOTA_UNIT_TARGET_FLAG_NONE",
fExpireTime = GameRules:GetGameTime() + 10.0,
bDeleteOnHit = true,
vVelocity = forwardVec,
bProvidesVision = true,
iVisionRadius = 400,
iVisionTeamNumber = caster:GetTeamNumber(),
}
local speed = 4000
local acceleration = -400
local iVelocity = 1000
local ishit = false
local effectIndex = ParticleManager:CreateParticle(projectileTable.EffectName, PATTACH_CUSTOMORIGIN, nil)
ParticleManager:SetParticleControlForward(effectIndex,3,(projectileTable.vVelocity*iVelocity/50 + speed/50 * (targetPoint - caster:GetOrigin()):Normalized()):Normalized())
local ability = projectileTable.Ability
local targets = {}
local targets_remove = {}
local totalDistance = 0
local time = 0
local high = 0
caster:SetContextThink(DoUniqueString("ability_caster_projectile"),
function()
if GameRules:IsGamePaused() then return 0.03 end
-- 向心力单位向量
local vecCentripetal = (projectileTable.vSpawnOriginNew - targetPoint):Normalized()
-- 向心力
local forceCentripetal = speed/50
-- 初速度单位向量
local vecInVelocity = projectileTable.vVelocity
-- 初始力
local forceIn = iVelocity/50
-- 投射物矢量
local vecProjectile = vecInVelocity * forceIn + forceCentripetal * vecCentripetal
local vec = projectileTable.vSpawnOriginNew + vecProjectile + Vector(0,0,high)
-- 投射物单位向量
local particleForward = vecProjectile:Normalized()
-- 目标和投射物距离
local dis = GetDistanceBetweenTwoVec2D(targetPoint,vec)
ParticleManager:SetParticleControlForward(effectIndex,3,particleForward)
totalDistance = totalDistance + math.sqrt(forceIn*forceIn + forceCentripetal*forceCentripetal)
if(dis<400)then
if ishit == false then
ishit = true
target:StartGesture(ACT_DOTA_FLAIL)
end
high = high + 25
target:SetAbsOrigin(projectileTable.vSpawnOriginNew+400*Vector(forwardVec.x,forwardVec.y,0)-Vector(0,0,50))
end
if(dis<projectileTable.fEndRadius)then
if(projectileTable.bDeleteOnHit)then
OnRumia03AbilityEnd(caster,target,keys.ability,effectIndex,time)
return nil
end
end
if(totalDistance<projectileTable.fDistance and dis>=projectileTable.fEndRadius)then
ParticleManager:SetParticleControl(effectIndex,3,vec)
projectileTable.vSpawnOriginNew = vec
speed = speed + acceleration
time = time + 0.02
return 0.02
else
if func then func(projectileTable.vSpawnOriginNew) end
ParticleManager:DestroyParticleSystem(effectIndex,true)
return nil
end
end,
0.02)
end
end
function OnRumia03AbilityEnd(caster,target,ability,effectIndex,time)
caster:SetContextThink(DoUniqueString("ability_caster_projectile_END"),
function()
if GameRules:IsGamePaused() then return 0.03 end
target:RemoveModifierByName("modifier_rumia_03_pause")
ParticleManager:DestroyParticleSystem(effectIndex,true)
local effectIndexEnd = ParticleManager:CreateParticle("particles/heroes/thtd_rumia/ability_rumia_04_explosion.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndexEnd, 0, target:GetOrigin())
ParticleManager:SetParticleControl(effectIndexEnd, 3, target:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndexEnd,false)
target:SetContextThink(DoUniqueString("ability_caster_projectile_END"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if THTD_IsValid(target) then
FindClearSpaceForUnit(target, target:GetOrigin(), false)
end
return nil
end,
0.2)
caster:AbilityKill(target, ability)
if caster.rumia_01_bonus == nil then
caster.rumia_01_bonus = 0
end
if caster.rumia_01_bonus < caster:GetAbilityValue("thtd_rumia_01", "max_bonus") then
caster.rumia_01_bonus = caster.rumia_01_bonus + 1
caster:THTD_AddBasePower(1)
end
return nil
end,
1.5 - time)
end
function Rumia04AttackTargetPoint(keys)
if keys.ability:GetLevel() < 1 then return end
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local vecCaster = caster:GetOrigin()
local pointRad = GetRadBetweenTwoVec2D(vecCaster,target:GetOrigin())
local randomPi = RandomFloat(-2*math.pi,2*math.pi)
local forwardVec = Vector(math.cos(pointRad+randomPi), math.sin(pointRad+randomPi),RandomFloat(0,1))
local BulletTable = {
Ability = keys.ability,
EffectName = "particles/heroes/thtd_rumia/ability_rumia_04.vpcf",
vSpawnOrigin = vecCaster,
vSpawnOriginNew = vecCaster,
fDistance = 5000,
fStartRadius = 60,
fEndRadius = 60,
Source = caster,
bHasFrontalCone = false,
bRepalceExisting = false,
iUnitTargetTeams = "DOTA_UNIT_TARGET_TEAM_ENEMY",
iUnitTargetTypes = "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_CREEP",
iUnitTargetFlags = "DOTA_UNIT_TARGET_FLAG_NONE",
fExpireTime = GameRules:GetGameTime() + 10.0,
bDeleteOnHit = true,
vVelocity = forwardVec,
bProvidesVision = true,
iVisionRadius = 400,
iVisionTeamNumber = caster:GetTeamNumber(),
}
local speed = 2000
local acc = 200
local iVelo = 1000
CreateProjectileMoveToPoint(BulletTable,caster,target:GetOrigin(),speed,iVelo,-acc,
function(vec)
local powerDamage = 0
local pv = caster:GetAbilityPowerValue("thtd_rumia_04")
if pv ~= nil then
powerDamage = pv[1]
end
local targetpoint = Vector(vec.x,vec.y,caster:GetOrigin().z)
local targets = THTD_FindUnitsInRadius(caster,targetpoint,keys.range)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) + powerDamage * caster:THTD_GetStarDamage()
for k,v in pairs(targets) do
local damage_table = {
victim = v,
attacker = caster,
damage = damage,
ability = keys.ability,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE,
}
UnitDamageTarget(damage_table)
end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_rumia/ability_rumia_04_explosion.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetpoint)
ParticleManager:SetParticleControl(effectIndex, 3, targetpoint)
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
)
end

View File

@@ -0,0 +1,239 @@
function OnSakuya01SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
local powerDamage = 0
local pv = caster:GetAbilityPowerValue("thtd_sakuya_01")
if pv ~= nil then
powerDamage = pv[1]
end
caster.power_damage = caster:THTD_GetAbilityPowerDamage(keys.ability) + powerDamage * caster:THTD_GetStarDamage()
if caster:IsPower666() then
caster.power_damage = caster.power_damage * 4
end
if caster:IsPower999() then
caster.power_damage = caster.power_damage * 12
end
if caster.thtd_sakuya_03_casted == true then
caster.power_damage = caster.power_damage * (1 - caster:GetAbilityValue("thtd_sakuya_03", "damage_down")/100)
end
local rad = GetRadBetweenTwoVec2D(caster:GetOrigin(),targetPoint)
local forward = Vector(math.cos(rad),math.sin(rad),caster:GetForwardVector().z)
local info =
{
Ability = keys.ability,
EffectName = "particles/thd2/heroes/sakuya/ability_sakuya_01.vpcf",
vSpawnOrigin = caster:GetOrigin() + Vector(0,0,128),
fDistance = 1000,
fStartRadius = 150,
fEndRadius = 150,
Source = caster,
bHasFrontalCone = false,
bReplaceExisting = false,
iUnitTargetTeam = DOTA_UNIT_TARGET_TEAM_ENEMY,
iUnitTargetFlags = DOTA_UNIT_TARGET_FLAG_NONE,
iUnitTargetType = DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC,
fExpireTime = GameRules:GetGameTime() + 10.0,
bDeleteOnHit = false,
vVelocity = forward * 2000,
bProvidesVision = true,
iVisionRadius = 1000,
iVisionTeamNumber = caster:GetTeamNumber()
}
local projectile = ProjectileManager:CreateLinearProjectile(info)
ParticleManager:DestroyLinearProjectileSystem(projectile,false)
local count = keys.max_count
for i=1,count do
local iVec = Vector( math.cos(rad + math.pi/36*(i+0.5)) * 2000 , math.sin(rad + math.pi/36*(i+0.5)) * 2000 , caster:GetForwardVector().z )
info.vVelocity = iVec
projectile = ProjectileManager:CreateLinearProjectile(info)
ParticleManager:DestroyLinearProjectileSystem(projectile,false)
iVec = Vector( math.cos(rad - math.pi/36*(i+0.5)) * 2000 , math.sin(rad - math.pi/36*(i+0.5)) * 2000 , caster:GetForwardVector().z )
info.vVelocity = iVec
projectile = ProjectileManager:CreateLinearProjectile(info)
ParticleManager:DestroyLinearProjectileSystem(projectile,false)
end
end
function OnSakuya01ProjectileHit(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local DamageTable = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = caster.power_damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
local sakuya_02_black_list =
{
"thtd_lily_01",
"thtd_daiyousei_01",
"thtd_koishi_04",
"thtd_sakuya_02",
"thtd_sakuya_03",
"thtd_yuuka_04",
"thtd_yukari_03",
"thtd_yukari_04",
"thtd_flandre_01",
"thtd_mokou_03",
"thtd_eirin_03",
"thtd_patchouli_04",
"thtd_hatate_02",
"thtd_sanae_03",
"thtd_minamitsu_02",
"thtd_minamitsu_03",
"thtd_toramaru_01",
"thtd_toramaru_02",
"thtd_toramaru_03",
"thtd_kanako_04",
"thtd_sanae_04",
"thtd_miko_04",
"thtd_keine_01",
"thtd_keine_03",
"thtd_suika_04",
"thtd_yuugi_03",
"thtd_alice_03",
"shinki_dragon_01",
"thtd_kagerou_03",
"death_prophet_exorcism",
"thtd_letty_01",
"thtd_suwako_04",
"thtd_komachi_04",
"thtd_junko_03",
"thtd_junko_04",
"thtd_clownpiece_03",
"thtd_kyouko_02",
"thtd_shikieiki_04",
"thtd_shinki_03",
}
function IsInSakuya02BlackList(ability)
for k,v in pairs(sakuya_02_black_list) do
if ability:GetAbilityName() == v then
return true
end
end
return false
end
function OnSakuya02SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local targetPoint = keys.target:GetOrigin()
-- local cooldown = keys.ability:GetCooldown(keys.ability:GetLevel() - 1) --获取当前等级的冷却时间
local cooldown = keys.ability:GetCooldownTimeRemaining() -- 或者 keys.ability:GetCooldownTime() 技能当前实际冷却时间
if keys.ability:GetLevel() >= 2 then
local unitName = target:GetUnitName()
if unitName == "remilia" or unitName == "flandre" or unitName == "patchouli" or unitName == "sakuya" or unitName == "koakuma" or unitName == "meirin" then
cooldown = cooldown * 0.5
keys.ability:EndCooldown()
keys.ability:StartCooldown(cooldown)
end
end
if target:THTD_IsTower() and target:HasModifier("modifier_sakuya_02_buff") == false then
caster.thtd_last_cast_unit = target
keys.ability:ApplyDataDrivenModifier(caster, target, "modifier_sakuya_02_buff", {duration=cooldown})
local effectIndex = ParticleManager:CreateParticle("particles/thd2/items/item_pocket_watch.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, target:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
for i=2,5 do
local ability = target:GetAbilityByIndex(i)
if ability~=nil and IsInSakuya02BlackList(ability) == false then
ability:EndCooldown()
target:GiveMana(target:GetRealManaCost(ability))
end
end
if caster == target then
target:THTD_AddManaRegenPercentage(keys.mana_reg)
caster:SetContextThink(DoUniqueString("ability_reimu_03"),
function()
if target~=nil and target:IsNull()==false and target:IsAlive() then
target:THTD_AddManaRegenPercentage(-keys.mana_reg)
end
return nil
end,
cooldown-0.2)
end
end
end
function OnSakuya03SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local powerCd = 0
local pv = caster:GetAbilityPowerValue("thtd_sakuya_03")
if pv ~= nil then
powerCd = pv[1]
end
if powerCd > 0 then
caster:ReCooldown(keys.ability, powerCd)
end
local duration = math.floor(100 * keys.duration_time + 0.5) / 100
local range = keys.range
local pauseUnit = {}
local effectIndex = ParticleManager:CreateParticle("particles/heroes/muyue/ability_muyue_014_aeons.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetOrigin())
ParticleManager:SetParticleControl(effectIndex, 1, Vector(range,range,range))
caster.thtd_sakuya_03_casted = true
caster:SetContextThink(DoUniqueString("ability_reimu_03"),
function()
if GameRules:IsGamePaused() then return 0.1 end
if duration < 0 or THTD_IsValid(caster) == false then
for k,v in pairs(pauseUnit) do
if v~=nil and v:IsNull()==false and v:IsAlive() then
v:RemoveModifierByName("modifier_sakuya_03_time_pause_debuff")
end
end
ParticleManager:DestroyParticleSystem(effectIndex,true)
pauseUnit = {}
caster.thtd_sakuya_03_casted = nil
return nil
end
local targets = THTD_FindUnitsInRadius(caster,caster:GetOrigin(),range)
for k,v in pairs(targets) do
if v:HasModifier("modifier_sakuya_03_time_pause_debuff") == false then
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_sakuya_03_time_pause_debuff", nil)
pauseUnit[v:GetEntityIndex()] = v
end
end
if caster:GetMana() < caster:GetMaxMana() then
caster:SetMana(caster:GetMaxMana())
end
local ability = caster:FindAbilityByName("thtd_sakuya_01")
local unit = targets[1]
if unit ~= nil and unit:IsNull() == false and ability:IsFullyCastable() then
caster:CastAbilityOnPosition(unit:GetOrigin(), ability, caster:GetPlayerOwnerID())
end
duration = duration - 0.1
return 0.1
end,
0)
end

View File

@@ -0,0 +1,271 @@
thtd_sanae_01 = class({})
LinkLuaModifier("modifier_sanae_01", "abilities/abilitySanae", LUA_MODIFIER_MOTION_NONE)
function thtd_sanae_01:OnSpellStart()
local caster = self:GetCaster()
local target = self:GetCursorTarget()
-- AI需要改动的地方
caster.thtd_last_cast_unit = target
local ExtraData = {
count=0
}
self:Sanae01PassToNextUnit(caster,caster:GetOrigin(),target,ExtraData)
end
function thtd_sanae_01:Sanae01PassToNextUnit(source,loction,target,data)
local caster = self:GetCaster()
local info =
{
Target = target,
Source = source,
Ability = self,
EffectName = "particles/heroes/sanae/ability_sanae_01.vpcf",
iMoveSpeed = 1400,
vSourceLoc= loction, -- Optional (HOW)
bDrawsOnMinimap = false, -- Optional
bDodgeable = true, -- Optional
bIsAttack = false, -- Optional
bVisibleToEnemies = true, -- Optional
bReplaceExisting = false, -- Optional
flExpireTime = GameRules:GetGameTime() + 10, -- Optional but recommended
bProvidesVision = true,
iVisionRadius = 400,
iVisionTeamNumber = caster:GetTeamNumber(),
ExtraData = {
count = data.count + 1
}
}
projectile = ProjectileManager:CreateTrackingProjectile(info)
end
function thtd_sanae_01:OnProjectileHit_ExtraData(hTarget, vLocation, data)
local caster = self:GetCaster()
local target = hTarget
if target:THTD_IsTower() and target.thtd_sanae_01_power_bonus == nil then
local duration_time = self:GetSpecialValueFor("duration_time")
target.thtd_sanae_01_power_bonus = math.max(1, math.floor(self:GetSpecialValueFor("power_bonus") * (1 - self:GetSpecialValueFor("down_percent")/100)^(data.count - 1)))
target:AddNewModifier(caster, self, "modifier_sanae_01", {duration = duration_time})
local effectIndex = ParticleManager:CreateParticle("particles/heroes/sanae/ability_sanae_01_effect.vpcf", PATTACH_CUSTOMORIGIN, target)
ParticleManager:SetParticleControlEnt(effectIndex , 0, target, 5, "follow_origin", Vector(0,0,0), true)
ParticleManager:DestroyParticleSystemTime(effectIndex, duration_time)
end
if data.count < self:GetSpecialValueFor("max_count") then
local targets =
FindUnitsInRadius(
caster:GetTeamNumber(),
caster:GetOrigin(),
nil,
self:GetSpecialValueFor("range"),
self:GetAbilityTargetTeam(),
self:GetAbilityTargetType(),
self:GetAbilityTargetFlags(),
FIND_ANY_ORDER,
false
)
for k,v in pairs(targets) do
if v~=nil and v~=target and v:THTD_IsTower() and v:HasModifier("modifier_sanae_01") == false then
self:Sanae01PassToNextUnit(target,vLocation,v,data)
break
end
end
end
return true
end
--------------------------------------------------------------------------------
modifier_sanae_01 = class({})
function modifier_sanae_01:OnCreated( kv )
if IsServer() then
local target = self:GetParent()
target:THTD_AddBasePower(target.thtd_sanae_01_power_bonus)
end
end
function modifier_sanae_01:OnDestroy()
if IsServer() then
local target = self:GetParent()
target:THTD_AddBasePower(-target.thtd_sanae_01_power_bonus)
target.thtd_sanae_01_power_bonus = nil
end
end
--------------------------------------------------------------------------------
function OnSanae02SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_sanae/ability_sanae_02.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
ParticleManager:DestroyParticleSystemTime(effectIndex, keys.duration_time)
effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_sanae/ability_sanae_02_p.vpcf", PATTACH_CUSTOMORIGIN, nil)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
ParticleManager:DestroyParticleSystemTime(effectIndex, keys.duration_time)
local time = keys.duration_time
caster:SetContextThink(DoUniqueString("thtd_patchouli04_spell_start"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if time <= 0 then return nil end
local targets = THTD_FindUnitsInRadius(caster, targetPoint, keys.range)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * 0.2
for k,v in pairs(targets) do
local modifier = v:FindModifierByName("modifier_sanae_debuff")
if modifier == nil then
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_sanae_debuff", {duration=0.2})
else
modifier:SetDuration(0.2,false)
end
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
time = time - 0.2
return 0.2
end,
0)
end
function OnSanae03SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
local time = keys.duration_time
local vec = targetPoint + RandomVector(keys.range)
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_sanae_03/ability_sanae_03.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, vec)
ParticleManager:SetParticleControl(effectIndex, 1, vec)
ParticleManager:SetParticleControl(effectIndex, 3, vec)
ParticleManager:SetParticleControl(effectIndex, 4, vec)
ParticleManager:SetParticleControl(effectIndex, 5, vec)
ParticleManager:SetParticleControl(effectIndex, 6, vec)
ParticleManager:DestroyParticleSystem(effectIndex,false)
caster:SetContextThink(DoUniqueString("thtd_patchouli04_spell_start"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if time <= 0 then return nil end
local targets = THTD_FindUnitsInRadius(caster,vec,keys.range)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * (1 + caster:THTD_GetFaith() * keys.damage_up/100)
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
UnitStunTarget(caster,v, keys.stun_time * (1 + caster:THTD_GetFaith() * keys.stun_up/100))
end
vec = targetPoint + RandomVector(keys.range)
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_sanae_03/ability_sanae_03.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, vec)
ParticleManager:SetParticleControl(effectIndex, 1, vec)
ParticleManager:SetParticleControl(effectIndex, 3, vec)
ParticleManager:SetParticleControl(effectIndex, 4, vec)
ParticleManager:SetParticleControl(effectIndex, 5, vec)
ParticleManager:SetParticleControl(effectIndex, 6, vec)
ParticleManager:DestroyParticleSystem(effectIndex,false)
time = time - 0.2
return 0.2
end,
0)
end
function OnSanae04SpellStart(keys)
local caster = keys.caster
local effectIndex = ParticleManager:CreateParticle("particles/heroes/sanae/ability_sanea_04_effect_b.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetOrigin())
ParticleManager:DestroyParticleSystemTime(effectIndex, keys.duration_time)
if keys.ability:GetLevel() < 2 then return end
local hero = GameRules.HeroList[caster:GetPlayerOwnerID()]
if hero == nil then return end
for k,v in pairs(hero.thtd_hero_tower_list) do
local unitName = v:GetUnitName()
if unitName == "sanae" or unitName == "kanako" or unitName == "suwako" then
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_sanae_04_buff", nil)
end
end
end
function OnCreatedSanae04Buff(keys)
keys.target:THTD_AddBasePower(keys.power_bonus * keys.target:THTD_GetFaith()/3, "thtd_sanae_04_buff")
end
function OnDestroySanae04Buff(keys)
keys.target:THTD_AddBasePower("thtd_sanae_04_buff")
end
function OnSanae04Created(keys)
-- local caster = EntIndexToHScript(keys.caster_entindex) 与下面一样
local caster = keys.caster
local target = keys.target
local unitName = target:GetUnitName()
if unitName == "sanae" or unitName == "kanako" or unitName == "suwako" then
if not target:HasModifier("modifier_sanae_04_combo_buff") then
local modifier = keys.ability:ApplyDataDrivenModifier(caster, target, "modifier_sanae_04_combo_buff", nil)
local hero = GameRules.HeroList[caster:GetPlayerOwnerID()]
if hero ~= nil and hero.thtd_ss_faith ~= nil and hero.thtd_ss_faith > 0 then
modifier:SetStackCount(hero.thtd_ss_faith)
end
end
end
end
function OnSanae04Destroy(keys)
local caster = keys.caster
local target = keys.target
local unitName = target:GetUnitName()
if unitName == "sanae" or unitName == "kanako" or unitName == "suwako" then
if target:HasModifier("modifier_sanae_04_combo_buff") then
target:RemoveModifierByName("modifier_sanae_04_combo_buff")
end
if target:HasModifier("modifier_sanae_04_buff") then
target:RemoveModifierByName("modifier_sanae_04_buff")
end
end
end
function OnCreatedSanae04ComboBuff(keys)
keys.target:THTD_AddBasePower(math.floor(keys.target:THTD_GetFaith()/3), "thtd_sanae_04_combo_buff", "thtd_sanae_04_combo_buff")
end
function OnDestroySanae04ComboBuff(keys)
keys.target:THTD_AddBasePower("thtd_sanae_04_combo_buff")
end
function OnSanaeKill(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
caster:THTD_AddFaith()
end

View File

@@ -0,0 +1,77 @@
local thtd_satori_02 =
{
[4] = 0.4,
[5] = 1.0,
}
function OnSatori01SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
local powerDamage = 0
local pv = caster:GetAbilityPowerValue("thtd_satori_02")
if pv ~= nil then
powerDamage = pv[1]
end
if caster:IsPower666() then
powerDamage = powerDamage + 400
end
local limit = 100 * (1 + powerDamage/100)
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.radius)
caster:EmitSound("Sound_THTD.thtd_satori_01")
for k,v in pairs(targets) do
local modifier = v:FindModifierByName("modifier_satori_01_debuff")
if modifier == nil then
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_satori_01_debuff", {Duration=keys.duration_time})
else
modifier:SetDuration(keys.duration_time,false)
end
local ability_02 = caster:FindAbilityByName("thtd_satori_02")
if ability_02 ~= nil and ability_02:GetLevel() > 0 and v.thtd_satori_02_debuff ~= true then
v.thtd_satori_02_debuff = true
local health = v:GetHealth()
local time = 3.0
v:SetContextThink(DoUniqueString("thtd_satori02_debuff"),
function()
if GameRules:IsGamePaused() then return 0.1 end
if not THTD_IsValid(v) then return nil end
if time <= 0 then
local damage = math.min(limit * caster:THTD_GetStarDamage(), (health - v:GetHealth()) * ability_02:GetSpecialValueFor("damage_percent") / 100)
local DamageTable = {
ability = ability_02,
victim = v,
attacker = caster,
damage = damage,
damage_type = ability_02:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
v.thtd_satori_02_debuff = false
return nil
end
time = time - 0.1
return 0.1
end,
0)
end
end
end
function OnSatori01ModifierCreated(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if caster:HasModifier("modifier_thtd_satori_02_combo_buff") and target.thtd_satori_01_debuff ~= true then
target.thtd_satori_01_debuff = true
local bonus = caster:GetAbilityValue("thtd_satori_02", "damage_up")
target:AddDamageIncomingPhysical(bonus, "thtd_satori_01_damage_up")
end
end
function OnSatori01ModifierDestroy(keys)
keys.target:AddDamageIncomingPhysical("thtd_satori_01_damage_up")
end

View File

@@ -0,0 +1,139 @@
local Seiga01ItemDrop =
{
[1] =
{
["item_1011"] = 1,
["item_1012"] = 0,
["item_1013"] = 0,
["item_1014"] = 0,
},
[2] =
{
["item_1011"] = 2,
["item_1012"] = 0,
["item_1013"] = 0,
["item_1014"] = 0,
},
[3] =
{
["item_1011"] = 2,
["item_1012"] = 1,
["item_1013"] = 0,
["item_1014"] = 0,
},
[4] =
{
["item_1011"] = 0,
["item_1012"] = 2,
["item_1013"] = 1,
["item_1014"] = 0,
},
[5] =
{
["item_1011"] = 0,
["item_1012"] = 0,
["item_1013"] = 2,
["item_1014"] = 1,
},
}
function OnSeiga01Death(keys)
if keys.caster==nil or keys.caster:IsNull() or keys.caster:IsAlive()==false then
return
end
local caster = keys.caster
local target = keys.unit
if SpawnSystem.IsUnLimited or GameRules:GetCustomGameDifficulty() >= FUNNY_MODE then
if caster:HasModifier("modifier_miko_02_buff") and caster.thtd_miko_buff_seiga ~= nil then
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_seiga/ability_seiga_03.vpcf",PATTACH_CUSTOMORIGIN,caster)
ParticleManager:SetParticleControl(effectIndex, 0, target:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
local targets = THTD_FindUnitsInRadius(caster,target:GetOrigin(),caster:GetAbilityValue("thtd_seiga_03", "range"))
local damage = THTD_GetTempleOfGodBuffedTowerStarCount(caster) * caster:THTD_GetPower() * caster.thtd_miko_buff_seiga
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = DAMAGE_TYPE_MAGICAL,
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
end
else
if caster.thtd_chance_count == nil then
caster.thtd_chance_count = {}
end
local hero = caster:GetOwner()
local count = 0
for itemName,chance in pairs(Seiga01ItemDrop[caster:THTD_GetStar()]) do
if chance > 0 then
if caster.thtd_chance_count[itemName] == nil then
caster.thtd_chance_count[itemName] = 0
end
local randChance = chance
if caster.thtd_chance_count[itemName] >= math.floor(100/randChance) then
randChance = 100
end
if RollPercentage(randChance) then
caster.thtd_chance_count[itemName] = 0
local item = CreateItem(itemName, nil, nil)
item.owner_player_id = caster:GetPlayerOwnerID()
item:SetPurchaser(hero)
item:SetPurchaseTime(1.0)
local pos = GetSpawnLineOffsetVector(hero.spawn_index, hero.spawn_position, count * 130, 150)
CreateItemOnPositionSync(pos,item)
else
caster.thtd_chance_count[itemName] = caster.thtd_chance_count[itemName] + 1
end
end
count = count + 1
end
end
end
function OnSeiga02SpellStart(keys)
local caster = keys.caster
local target = keys.target
if target:THTD_IsTower() and target:IsInAttackSpeedBlackList() == false then
keys.ability:ApplyDataDrivenModifier(caster, target, "modifier_seiga_02_attack_speed_buff", {})
caster.thtd_last_cast_unit = target
end
end
function OnSeiga03Death(keys)
if keys.caster==nil or keys.caster:IsNull() or keys.caster:IsAlive()==false then
return
end
if keys.ability:GetLevel()<1 then return end
local caster = keys.caster
local target = keys.unit
local count = target:GetPoisonCount()
if count > 0 then
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_seiga/ability_seiga_03.vpcf",PATTACH_CUSTOMORIGIN,caster)
ParticleManager:SetParticleControl(effectIndex, 0, target:GetOrigin())
ParticleManager:DestroyParticleSystem(effectIndex,false)
local targets = THTD_FindUnitsInRadius(caster,target:GetOrigin(),keys.range)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * count
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
end
end

View File

@@ -0,0 +1,185 @@
function OnSpellStartShikieiki01(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targets = THTD_FindUnitsInRadius(caster,caster:GetAbsOrigin(),keys.range)
if GameRules:GetGameTime() - (caster.thtd_shikieiki_01_sound or 0) > 12 then
caster.thtd_shikieiki_01_sound = GameRules:GetGameTime()
caster:EmitSound("Hero_Chen.PenitenceCast")
caster:EmitSound("Hero_Chen.PenitenceImpact")
end
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
for k,v in pairs(targets) do
local effectIndex = ParticleManager:CreateParticle("particles/heroes/shikieiki/ability_shikieiki_01_guilty.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControlEnt(effectIndex , 0, v, 5, "follow_origin", Vector(0,0,0), true)
ParticleManager:DestroyParticleSystem(effectIndex, false)
local modifier = v:FindModifierByName(keys.modifier)
if modifier == nil then
modifier = keys.ability:ApplyDataDrivenModifier(caster, v, keys.modifier, nil)
modifier:SetStackCount(RandomInt(1, 3))
local effectIndex2 = ParticleManager:CreateParticle("particles/heroes/shikieiki/ability_shikieiki_01_guilty_b.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControlEnt(effectIndex2 , 0, v, 5, "follow_origin", Vector(0,0,0), true)
ParticleManager:SetParticleControl(effectIndex2, 1, v:GetOrigin())
ParticleManager:SetParticleControl(effectIndex2, 2, v:GetOrigin())
ParticleManager:SetParticleControl(effectIndex2, 3, v:GetOrigin())
v.thtd_shikieiki_01_count_effect = effectIndex2
else
local count = modifier:GetStackCount()
if count < 10 then
modifier:SetStackCount(math.min(10, count + RandomInt(1, 3)))
end
end
if modifier ~= nil then
ParticleManager:SetParticleControl(v.thtd_shikieiki_01_count_effect, 1, Vector(0,modifier:GetStackCount(),0))
end
local damage_table = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(damage_table)
end
end
function OnDestroyShikieiki01Debuff(keys)
local target = keys.target
ParticleManager:DestroyParticleSystem(target.thtd_shikieiki_01_count_effect, true)
end
function OnSpellStartShikieiki02(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targets = THTD_FindUnitsInRadius(caster,caster:GetAbsOrigin(),keys.range)
local count = 0
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
for k,v in pairs(targets) do
local effectIndex = ParticleManager:CreateParticle("particles/units/heroes/hero_omniknight/omniknight_purification.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, v:GetOrigin())
ParticleManager:SetParticleControl(effectIndex, 1, Vector(1,1,1))
ParticleManager:SetParticleControl(effectIndex, 2, Vector(0,0,0))
ParticleManager:DestroyParticleSystem(effectIndex, false)
local modifier = v:FindModifierByName(keys.modifier)
local crit = 1
if modifier ~= nil then
count = count + modifier:GetStackCount()
crit = 1 + modifier:GetStackCount() * keys.damage_up/100
modifier:Destroy()
end
local damage_table = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage * crit,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(damage_table)
end
if count > 0 then
caster.thtd_shikieiki_02_power_bonus = count * keys.power_bonus
caster:RemoveModifierByName("modifier_shikieiki_02_buff")
keys.ability:ApplyDataDrivenModifier(caster, caster, "modifier_shikieiki_02_buff", {})
end
end
function OnCreatedShikieiki02Buff(keys)
keys.target:THTD_AddBasePower(keys.target.thtd_shikieiki_02_power_bonus, "thtd_shikieiki_02_buff")
end
function OnDestroyShikieiki02Buff(keys)
keys.target:THTD_AddBasePower("thtd_shikieiki_02_buff")
end
function OnCreatedShikieiki03Debuff(keys)
local caster = keys.caster
local target = keys.target
local effectIndex = ParticleManager:CreateParticle(
"particles/heroes/shikieiki/ability_shikieiki_04.vpcf",
PATTACH_CUSTOMORIGIN,
target)
ParticleManager:SetParticleControlEnt(effectIndex , 0, target, 5, "follow_origin", Vector(0,0,0), true)
ParticleManager:SetParticleControlEnt(effectIndex , 1, target, 5, "follow_origin", Vector(0,0,0), true)
ParticleManager:SetParticleControlEnt(effectIndex , 4, target, 5, "follow_origin", Vector(0,0,0), true)
target.thtd_shikieiki_03_effect = effectIndex
if not keys.ability:GetAutoCastState() then
caster:EmitSound("Voice_Thdots_Shikieiki.AbilityShikieiki04")
end
end
function OnIntervalThinkShikieiki03(keys)
UnitDamageHpRemove(keys.caster, keys.target, keys.hp_damage, false)
end
function OnDestroyShikieiki03Debuff(keys)
ParticleManager:DestroyParticleSystem(keys.target.thtd_shikieiki_03_effect, true)
end
function OnSpellStartShikieiki04(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
local effectIndex = ParticleManager:CreateParticle("particles/econ/items/enigma/enigma_world_chasm/enigma_blackhole_ti5.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
caster:EmitSound("Hero_Enigma.Black_Hole")
local time = keys.duration_time
local tick = 0.05
local count = 0
local damage_tick = math.floor(keys.tick * 100 + 0.5)/100
local damage_count = math.floor(damage_tick/tick)
caster:SetContextThink(DoUniqueString("thtd_shikieiki_04"),
function()
if GameRules:IsGamePaused() then return 0.1 end
count = count + 1
if time < 0 or THTD_IsValid(caster) == false then
ParticleManager:DestroyParticleSystem(effectIndex, true)
caster:StopSound("Hero_Enigma.Black_Hole")
return nil
end
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.radius)
local damage = 0
if count%damage_count == 0 then
damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
end
for k, v in pairs(targets) do
local distance = (v:GetAbsOrigin() - targetPoint):Length2D()
local in_pull = 400
local new_pos = GetGroundPosition(RotatePosition(targetPoint, QAngle(0,1.5,0), v:GetAbsOrigin()), v)
if distance > 20 then
local direction = (targetPoint - new_pos):Normalized()
direction.z = 0.0
new_pos = new_pos + direction * in_pull * tick
end
v:SetOrigin(new_pos)
if damage > 0 then
local damage_table = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(damage_table)
end
end
time = time - tick
return tick
end,
0)
end

View File

@@ -0,0 +1,395 @@
-- 是否魔界
function IsMakaiCard(unit)
local unitName = unit:GetUnitName()
if unitName == "shinki" or unitName == "alice" or unitName == "koakuma" or unitName == "mima" then
return true
else
return false
end
end
function OnShinki01Think(keys)
local caster = keys.caster
local targets = THTD_FindFriendlyUnitsInRadius(caster,caster:GetOrigin(),1200)
for k,v in pairs(targets) do
if IsMakaiCard(v) then
local modifier = v:FindModifierByName(keys.modifier)
if modifier ~= nil then
modifier:SetDuration(0.3, false)
else
if v.thtd_shinki_01_kill_count == nil then
v.thtd_shinki_01_kill_count = 0
end
modifier = keys.ability:ApplyDataDrivenModifier(caster, v, keys.modifier, {duration = 0.3})
if modifier ~= nil and v.thtd_shinki_01_kill_count > 0 then
modifier:SetStackCount(v.thtd_shinki_01_kill_count)
end
end
end
end
end
function OnCreatedShinki01Buff(keys)
keys.target:THTD_AddBasePower(keys.kill_bonus * keys.target.thtd_shinki_01_kill_count, "thtd_shinki_01_kill")
end
function OnDestroyShinki01Buff(keys)
keys.target:THTD_AddBasePower("thtd_shinki_01_kill")
end
function OnSpellStartShinki02(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local castPoint = caster:GetOrigin()
-- local effect = "particles/econ/items/queen_of_pain/qop_arcana/qop_arcana_sonic_wave.vpcf"
local effect = "particles/econ/items/queen_of_pain/qop_arcana/qop_arcana_sonic_wave_v2.vpcf"
local range = keys.ability:GetCastRange()
for i=1,6 do
local forward = Vector(math.cos(i*math.pi/3),math.sin(i*math.pi/3),0)
local effectIndex = ParticleManager:CreateParticle(effect, PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, castPoint)
ParticleManager:SetParticleControl(effectIndex, 1, forward * (range/2))
ParticleManager:ReleaseParticleIndex(effectIndex)
-- local info =
-- {
-- Ability = keys.ability,
-- EffectName = effect,
-- vSpawnOrigin = castPoint,
-- fDistance = range,
-- fStartRadius = 100,
-- fEndRadius = 500,
-- Source = caster,
-- iSourceAttachment = "mouth",
-- bHasFrontalCone = false,
-- bReplaceExisting = false,
-- iUnitTargetTeam = DOTA_UNIT_TARGET_TEAM_ENEMY,
-- iUnitTargetFlags = DOTA_UNIT_TARGET_FLAG_NONE,
-- iUnitTargetType = DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC,
-- fExpireTime = GameRules:GetGameTime() + 10.0,
-- bDeleteOnHit = false,
-- vVelocity = forward * 1400,
-- bProvidesVision = false,
-- ExtraData = {}
-- }
-- ProjectileManager:CreateLinearProjectile(info)
end
local tick = math.floor(keys.tick * 100 + 0.5)/100
local time = math.floor(keys.duration_time * 100 + 0.5)/100
caster:SetContextThink(DoUniqueString("dota_timer"),
function()
if GameRules:IsGamePaused() then return 0.1 end
time = time - tick
if time < 0 then
return nil
end
local targets = THTD_FindUnitsInRadius(caster,castPoint,range)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
local type = keys.ability:GetAbilityDamageType()
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = type,
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
return tick
end,
tick)
end
function OnSpellStartShinki03(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
if caster:HasModifier(keys.modifier) then
caster:RemoveModifierByName(keys.modifier)
end
local modifier = keys.ability:ApplyDataDrivenModifier(caster, caster, keys.modifier, nil)
local pfx_caster = ParticleManager:CreateParticle("particles/units/heroes/heroes_underlord/abbysal_underlord_darkrift_ambient.vpcf", PATTACH_ABSORIGIN_FOLLOW, caster)
ParticleManager:SetParticleControlEnt(pfx_caster, 2, caster, PATTACH_ABSORIGIN_FOLLOW, nil, caster:GetAbsOrigin(), true)
ParticleManager:SetParticleControl(pfx_caster, 1, Vector(0, 0, 0))
modifier:AddParticle(pfx_caster, false, false, 15, false, false)
-- caster:EmitSound("Hero_Nevermore.ROS.Arcana.Cast")
caster:EmitSound("Hero_Terrorblade.Metamorphosis")
local effectIndex = ParticleManager:CreateParticle("particles/econ/items/terrorblade/terrorblade_back_ti8/terrorblade_sunder_ti8.vpcf", PATTACH_ROOTBONE_FOLLOW, caster)
-- ParticleManager:SetParticleControlEnt(effectIndex, 0, caster, PATTACH_ROOTBONE_FOLLOW, "follow_rootbone", caster:GetAbsOrigin(), true)
-- ParticleManager:SetParticleControlEnt(effectIndex, 1, caster, PATTACH_ROOTBONE_FOLLOW, "follow_rootbone", caster:GetAbsOrigin(), true)
ParticleManager:SetParticleControlEnt(effectIndex, 0, caster, PATTACH_ROOTBONE_FOLLOW, "follow_origin", caster:GetAbsOrigin(), true)
ParticleManager:SetParticleControlEnt(effectIndex, 1, caster, PATTACH_ROOTBONE_FOLLOW, "follow_origin", caster:GetAbsOrigin(), true)
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
function OnCreatedShinki03Buff(keys)
local target = keys.target
target:SetModelScale(target:GetModelScale() * 2)
target:THTD_AddBasePower(keys.power_bonus, "thtd_shinki_03_bonus")
target:THTD_DestroyLevelEffect()
end
function OnDestroyShinki03Buff(keys)
local target = keys.target
target:SetModelScale(target:GetModelScale() / 2)
target:THTD_AddBasePower("thtd_shinki_03_bonus")
target:THTD_CreateLevelEffect()
end
local baseModel = 1.0
function OnShinki04Spawn(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local entities = Entities:FindAllByClassname("npc_dota_creature")
for k,v in pairs(entities) do
local findNum = string.find(v:GetUnitName(), 'shinki_dragon')
if findNum ~= nil and v~=nil and v:IsNull()==false and v:IsAlive() then
local c = v.thtd_spawn_unit_owner
if c:GetOwner() == caster:GetOwner() then
CustomGameEventManager:Send_ServerToPlayer(caster:GetPlayerOwner(), "display_custom_error", {msg="shinki_dragon_casted"})
keys.ability:EndCooldown()
return
end
end
end
if caster.ability_shinki04_devour_count == nil then
caster.ability_shinki04_devour_count = 0
end
local unit = CreateUnitByName(
"shinki_dragon"
,caster:GetOrigin() + caster:GetForwardVector() * 500
,false
,caster:GetOwner()
,caster:GetOwner()
,caster:GetTeam()
)
if unit == nil then
keys.ability:EndCooldown()
return
end
FindClearSpaceForUnit(unit, unit:GetOrigin(), false)
unit:SetModelScale(baseModel * (1 + caster.ability_shinki04_devour_count * 0.02))
unit:SetControllableByPlayer(caster:GetPlayerOwnerID(), false)
unit:SetHasInventory(false)
unit.thtd_spawn_unit_owner = caster
local powerStack = math.max(0, math.min(3, caster:GetTowerPowerLevel()))
local hero = caster:GetOwner()
if GameRules.player_bb_buff[hero.thtd_player_id]["item_3016"] > 0 or powerStack > 0 then
unit:AddNewModifier(unit, nil, "modifier_bb_buff_3016_effect", nil):SetStackCount(GameRules.player_bb_buff[hero.thtd_player_id]["item_3016"] + powerStack)
end
local ability = unit:GetAbilityByIndex(0)
if ability ~= nil then
ability:SetActivated(true)
ability:SetLevel(1)
end
ability = unit:GetAbilityByIndex(1)
if ability ~= nil then
ability:SetActivated(true)
ability:SetLevel(1)
end
ability = unit:GetAbilityByIndex(2)
if ability ~= nil then
ability:SetActivated(true)
ability:SetLevel(1)
end
ability = unit:FindAbilityByName("shinki_dragon_01")
if ability ~= nil then
if caster.ability_shinki04_devour_count > 0 then
ability:ApplyDataDrivenModifier(unit, unit, "modifier_shinki_dragon_01_buff", nil)
unit:SetModifierStackCount("modifier_shinki_dragon_01_buff", unit, caster.ability_shinki04_devour_count)
end
local modifier = caster:FindModifierByName("modifier_shinki_dragon_01_cooldown")
if modifier ~= nil then
ability:StartCooldown(modifier:GetDuration())
end
end
keys.ability:ApplyDataDrivenModifier(caster, unit, "modifier_shinki_04_buff", nil)
local oldSwpanUnit = caster.thtd_summon_unit
if oldSwpanUnit ~=nil and oldSwpanUnit:IsNull() == false then
oldSwpanUnit:AddNoDraw()
oldSwpanUnit:ForceKill(false)
end
caster.thtd_summon_unit = unit
local factor = unit:GetAbilityValue("shinki_dragon_01", "damage_up", true)
local attackValue = math.floor(caster:THTD_GetStarDamage() * (1 + caster.ability_shinki04_devour_count * factor))
unit:SetBaseDamageMax(attackValue)
unit:SetBaseDamageMin(attackValue)
unit:SetContextThink(DoUniqueString("modifier_shinki_04"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if caster==nil or caster:IsNull() or caster:IsAlive()==false or caster:THTD_IsHidden() then
unit:AddNoDraw()
unit:ForceKill(false)
caster.thtd_summon_unit = nil
return nil
end
attackValue = math.floor(caster:THTD_GetStarDamage() * (1 + caster.ability_shinki04_devour_count * factor))
unit:SetBaseDamageMax(attackValue)
unit:SetBaseDamageMin(attackValue)
unit:InheritOwnerBuff(caster)
if GetDistanceBetweenTwoVec2D(caster:GetOrigin(), unit:GetOrigin()) > 1000 then
local forward = (unit:GetAbsOrigin() - caster:GetAbsOrigin()):Normalized()
unit:MoveToPosition(caster:GetOrigin() + forward*1000)
end
enemy = unit:GetAttackTarget()
ability = unit:FindAbilityByName("shinki_dragon_01")
if unit:IsReadyToCastAbility(ability) and enemy ~= nil and enemy.thtd_damage_lock ~= true then
if enemy~=nil and enemy:IsNull()==false and enemy:IsAlive() then
unit:CastAbilityOnTarget(enemy, ability, caster:GetPlayerOwnerID())
end
end
ability = unit:FindAbilityByName("shinki_dragon_03")
if unit:IsReadyToCastAbility(ability) then
if enemy~=nil and enemy:IsNull()==false and enemy:IsAlive() then
unit:CastAbilityNoTarget(ability, caster:GetPlayerOwnerID())
end
end
return math.floor(100/unit:GetAttacksPerSecond()) / 100
end,
0)
end
function OnShinkiDragon01SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local owner = caster.thtd_spawn_unit_owner
if owner==nil or owner:IsNull() or owner:IsAlive()==false or owner:THTD_IsHidden() then return end
if target.thtd_damage_lock == true then return end
local cooldown = math.floor(target:GetHealth() / caster:GetAverageTrueAttackDamage(caster))
cooldown = math.min(600, math.max(15, cooldown))
keys.ability:ApplyDataDrivenModifier(owner, owner, "modifier_shinki_dragon_01_cooldown", {Duration = cooldown})
keys.ability:StartCooldown(cooldown)
caster:NpcKill(target)
local max_count = keys.max_count
if owner:IsPower999() then max_count = 999 end
if owner.ability_shinki04_devour_count < max_count then
local skipedCount = 0
if SpawnSystem.ReachToWave ~= nil then
if owner.skiped_wave == nil then
owner.skiped_wave = SpawnSystem.ReachToWave + 50 - SpawnSystem.CurWave - 1
end
elseif owner.skiped_wave ~= nil then
skipedCount = owner.skiped_wave * 2
owner.skiped_wave = nil
end
local addCount = math.min(max_count - owner.ability_shinki04_devour_count, 1 + skipedCount)
owner.ability_shinki04_devour_count = owner.ability_shinki04_devour_count + addCount
caster:SetModelScale(baseModel * (1 + math.min(3, owner.ability_shinki04_devour_count * 0.02)))
if not caster:HasModifier("modifier_shinki_dragon_01_buff") then
keys.ability:ApplyDataDrivenModifier(caster, caster, "modifier_shinki_dragon_01_buff", nil)
end
caster:SetModifierStackCount("modifier_shinki_dragon_01_buff", caster, owner.ability_shinki04_devour_count)
elseif owner.ability_shinki04_devour_count > max_count then
owner.ability_shinki04_devour_count = max_count
caster:SetModelScale(baseModel * (1 + math.min(3, owner.ability_shinki04_devour_count * 0.02)))
caster:SetModifierStackCount("modifier_shinki_dragon_01_buff", caster, owner.ability_shinki04_devour_count)
end
end
function OnShinki02AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local owner = caster.thtd_spawn_unit_owner
if owner==nil or owner:IsNull() or owner:IsAlive()==false or owner:THTD_IsHidden() then return end
local target = keys.target
if RollPercentage(keys.chance) then
local enemies = THTD_FindUnitsInRadius(owner, target:GetOrigin(), keys.range)
local damage = caster:GetAverageTrueAttackDamage(caster)
local isEnabledStun = false
if caster.stun_locked ~= true then
isEnabledStun = true
caster.stun_locked = true
caster:SetContextThink(DoUniqueString("modifier_shinki_04"),
function()
caster.stun_locked = false
return nil
end,
1.0)
end
if #enemies > 0 then
for k,v in pairs(enemies) do
if isEnabledStun then
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_bash_stun_datadriven", {Duration = keys.stun_time})
end
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
if v == target then
DamageTable.damage = DamageTable.damage * keys.damage_crit
else
DamageTable.damage = DamageTable.damage * keys.aoe_crit
end
UnitDamageTarget(DamageTable)
end
end
caster:EmitSound("Hero_Slardar.Bash")
end
end
function OnShinkiDragon03SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local owner = caster.thtd_spawn_unit_owner
if owner==nil or owner:IsNull() or owner:IsAlive()==false or owner:THTD_IsHidden() then return end
local crit = 1
if owner:IsPower666() then
crit = 4
keys.ability:EndCooldown()
keys.ability:StartCooldown(1.0)
end
local enemies = THTD_FindUnitsInRadius(owner, caster:GetOrigin(), keys.RangeRadius)
local damage = caster:GetAverageTrueAttackDamage(caster) * keys.DamageTimes * crit
local debuff = "modifier_earthshock_debuff_datadriven"
if #enemies > 0 then
for k,v in pairs(enemies) do
keys.ability:ApplyDataDrivenModifier(caster, v, debuff, {})
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
end
end

View File

@@ -0,0 +1,15 @@
function OnSizuha02StarImprove(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
if target:THTD_IsTower() and target:GetUnitName()~=caster:GetUnitName() and target:THTD_GetStar() < caster:THTD_GetStar() and target:GetUnitName() ~= "minoriko" and target:GetUnitName() ~= "sizuha" then
target:THTD_SetStar(target:THTD_GetStar()+1)
target:THTD_SetLevel(THTD_MAX_LEVEL)
caster.thtd_is_changed = true
caster.thtd_star = caster:THTD_GetStar() - 1
caster:THTD_OpenAbility()
caster:THTD_DestroyLevelEffect()
caster:THTD_CreateLevelEffect()
end
end

View File

@@ -0,0 +1,403 @@
function OnSoga01SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
if caster:HasModifier("modifier_miko_02_buff") and caster.thtd_miko_buff_soga01 ~= nil then
caster:ReCooldown(keys.ability, caster.thtd_miko_buff_soga01)
end
if caster.thtd_soga_01_effect_list == nil then
caster.thtd_soga_01_effect_list = {}
end
if caster.thtd_soga_01_rect_last ~= nil then
for index,point in pairs(caster.thtd_soga_01_rect_last) do
local forward = (point - caster:GetAbsOrigin()):Normalized()
for i=1,math.floor(keys.length/100) do
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_soga/ability_soga_01.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetOrigin() + 100 * i * forward)
ParticleManager:SetParticleControl(effectIndex, 1, caster:GetOrigin() + 100 * i * forward)
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
caster:SetContextThink(DoUniqueString("thtd_soga_01_spell_delay"),
function()
if GameRules:IsGamePaused() then return 0.03 end
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
local targets =
FindUnitsInLine(
caster:GetTeamNumber(),
caster:GetOrigin(),
caster:GetOrigin() + keys.length * forward,
nil,
200,
keys.ability:GetAbilityTargetTeam(),
keys.ability:GetAbilityTargetType(),
keys.ability:GetAbilityTargetFlags()
)
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
UnitStunTarget(caster,v,keys.stun_time)
end
for k,v in pairs(caster.thtd_soga_01_effect_list) do
ParticleManager:DestroyParticleSystem(v,true)
end
caster.thtd_soga_01_effect_list = {}
caster.thtd_soga_01_rect_last = {}
return nil
end,
0.2)
end
else
caster.thtd_soga_01_rect_last = {}
end
local forward = (targetPoint - caster:GetAbsOrigin()):Normalized()
for i=1,math.floor(keys.length/100) do
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_soga/ability_soga_01.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetOrigin() + 100 * i * forward)
ParticleManager:SetParticleControl(effectIndex, 1, caster:GetOrigin() + 100 * i * forward)
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
caster:SetContextThink(DoUniqueString("thtd_soga_01_spell_delay"),
function()
if GameRules:IsGamePaused() then return 0.03 end
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
local targets =
FindUnitsInLine(
caster:GetTeamNumber(),
caster:GetOrigin(),
caster:GetOrigin() + 800 * forward,
nil,
200,
keys.ability:GetAbilityTargetTeam(),
keys.ability:GetAbilityTargetType(),
keys.ability:GetAbilityTargetFlags()
)
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
UnitStunTarget(caster,v,keys.stun_time)
end
table.insert(caster.thtd_soga_01_rect_last,targetPoint)
for i=1,8 do
local effectIndex2 = ParticleManager:CreateParticle("particles/heroes/thtd_soga/ability_thtd_soga_lightning.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex2, 0, caster:GetOrigin() + 100 * i * forward)
table.insert(caster.thtd_soga_01_effect_list,effectIndex2)
end
return nil
end,
0)
end
function OnSoga02SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
if caster.thtd_soga_02_effect_list == nil then
caster.thtd_soga_02_effect_list = {}
end
if caster.thtd_soga_02_rect_last ~= nil then
for index,point in pairs(caster.thtd_soga_02_rect_last) do
caster:SetContextThink(DoUniqueString("thtd_soga_02_spell_delay"),
function()
if GameRules:IsGamePaused() then return 0.03 end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_soga/ability_soga_02.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, point)
ParticleManager:SetParticleControl(effectIndex, 1, point)
ParticleManager:DestroyParticleSystem(effectIndex,false)
return nil
end,
0.5)
caster:SetContextThink(DoUniqueString("thtd_soga_02_spell_delay"),
function()
if GameRules:IsGamePaused() then return 0.03 end
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * keys.damage_down/100
local targets = THTD_FindUnitsInRadius(caster,point,keys.range)
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
for k,v in pairs(caster.thtd_soga_02_effect_list) do
ParticleManager:DestroyParticleSystem(v,true)
end
caster.thtd_soga_02_effect_list = {}
caster.thtd_soga_02_rect_last = {}
return nil
end,
0.7)
end
else
caster.thtd_soga_02_rect_last = {}
end
caster:SetContextThink(DoUniqueString("thtd_soga_02_spell_delay"),
function()
if GameRules:IsGamePaused() then return 0.03 end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_soga/ability_soga_02.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
ParticleManager:SetParticleControl(effectIndex, 1, targetPoint)
ParticleManager:DestroyParticleSystem(effectIndex,false)
return nil
end,
0.5)
caster:SetContextThink(DoUniqueString("thtd_soga_02_spell_delay"),
function()
if GameRules:IsGamePaused() then return 0.03 end
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.range)
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
for i=1,12 do
local effectIndex2 = ParticleManager:CreateParticle("particles/heroes/thtd_soga/ability_thtd_soga_lightning.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex2, 0, targetPoint+Vector(math.cos(i*math.pi*2/12),math.sin(i*math.pi*2/12),0)*keys.range)
table.insert(caster.thtd_soga_02_effect_list,effectIndex2)
end
table.insert(caster.thtd_soga_02_rect_last,targetPoint)
return nil
end,
0.7)
end
function OnSoga03SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
if caster:HasModifier("modifier_miko_02_buff") and caster.thtd_miko_buff_soga03 ~= nil then
caster:ReCooldown(keys.ability, caster.thtd_miko_buff_soga03)
end
if caster.thtd_soga_03_effect_list == nil then
caster.thtd_soga_03_effect_list = {}
end
if caster.thtd_soga_03_rect_last ~= nil then
for index,point in pairs(caster.thtd_soga_03_rect_last) do
caster:SetContextThink(DoUniqueString("thtd_soga_03_spell_delay"),
function()
if GameRules:IsGamePaused() then return 0.03 end
local count = 0
caster:SetContextThink(DoUniqueString("thtd_soga_03_spell_think"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if count < 9 then
count = count + 1
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_soga/ability_soga_01.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, point+Vector(math.cos(math.pi/2+count*math.pi*2/18),math.sin(math.pi/2+count*math.pi*2/18),0)*500)
ParticleManager:SetParticleControl(effectIndex, 1, point+Vector(math.cos(math.pi/2+count*math.pi*2/18),math.sin(math.pi/2+count*math.pi*2/18),0)*500)
ParticleManager:DestroyParticleSystem(effectIndex,false)
local effectIndex2 = ParticleManager:CreateParticle("particles/heroes/thtd_soga/ability_soga_01.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex2, 0, point+Vector(math.cos(-math.pi/2+count*math.pi*2/18),math.sin(-math.pi/2+count*math.pi*2/18),0)*500)
ParticleManager:SetParticleControl(effectIndex2, 1, point+Vector(math.cos(-math.pi/2+count*math.pi*2/18),math.sin(-math.pi/2+count*math.pi*2/18),0)*500)
ParticleManager:DestroyParticleSystem(effectIndex2,false)
return 0.1
else
return nil
end
end,
0.1)
return nil
end,
0)
caster:SetContextThink(DoUniqueString("thtd_soga_03_spell_effect_delay"),
function()
if GameRules:IsGamePaused() then return 0.03 end
for i=1,6 do
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_soga/ability_soga_01.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, point+Vector(math.cos(-math.pi/2+i*math.pi*2/6),math.sin(-math.pi/2+i*math.pi*2/6),0)*400)
ParticleManager:SetParticleControl(effectIndex, 1, point+Vector(math.cos(-math.pi/2+i*math.pi*2/6),math.sin(-math.pi/2+i*math.pi*2/6),0)*400)
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
for i=1,3 do
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_soga/ability_soga_01.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, point+Vector(math.cos(-math.pi/2+i*math.pi*2/3),math.sin(-math.pi/2+i*math.pi*2/3),0)*200)
ParticleManager:SetParticleControl(effectIndex, 1, point+Vector(math.cos(-math.pi/2+i*math.pi*2/3),math.sin(-math.pi/2+i*math.pi*2/3),0)*200)
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
for i=1,1 do
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_soga/ability_soga_01.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, point+Vector(math.cos(-math.pi/2+i*math.pi*2/1),math.sin(-math.pi/2+i*math.pi*2/1),0)*100)
ParticleManager:SetParticleControl(effectIndex, 1, point+Vector(math.cos(-math.pi/2+i*math.pi*2/1),math.sin(-math.pi/2+i*math.pi*2/1),0)*100)
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
return nil
end,
1.1)
caster:SetContextThink(DoUniqueString("thtd_soga_03_spell_delay"),
function()
if GameRules:IsGamePaused() then return 0.03 end
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * keys.damage_down/100
local targets = THTD_FindUnitsInRadius(caster,point,keys.range)
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
if keys.damage_up > 0 and v:HasModifier("modifier_soga_03_debuff") == false then
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_soga_03_debuff", {Duration = keys.duration_time})
end
end
for k,v in pairs(caster.thtd_soga_03_effect_list) do
ParticleManager:DestroyParticleSystem(v,true)
end
caster.thtd_soga_03_effect_list = {}
caster.thtd_soga_03_rect_last = {}
return nil
end,
1.3)
end
else
caster.thtd_soga_03_rect_last = {}
end
caster:SetContextThink(DoUniqueString("thtd_soga_03_spell_delay"),
function()
if GameRules:IsGamePaused() then return 0.03 end
local count = 0
caster:SetContextThink(DoUniqueString("thtd_soga_03_spell_think"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if count < 9 then
count = count + 1
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_soga/ability_soga_01.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint+Vector(math.cos(math.pi/2+count*math.pi*2/18),math.sin(math.pi/2+count*math.pi*2/18),0)*500)
ParticleManager:SetParticleControl(effectIndex, 1, targetPoint+Vector(math.cos(math.pi/2+count*math.pi*2/18),math.sin(math.pi/2+count*math.pi*2/18),0)*500)
ParticleManager:DestroyParticleSystem(effectIndex,false)
local effectIndex2 = ParticleManager:CreateParticle("particles/heroes/thtd_soga/ability_soga_01.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex2, 0, targetPoint+Vector(math.cos(-math.pi/2+count*math.pi*2/18),math.sin(-math.pi/2+count*math.pi*2/18),0)*500)
ParticleManager:SetParticleControl(effectIndex2, 1, targetPoint+Vector(math.cos(-math.pi/2+count*math.pi*2/18),math.sin(-math.pi/2+count*math.pi*2/18),0)*500)
ParticleManager:DestroyParticleSystem(effectIndex2,false)
return 0.1
else
return nil
end
end,
0.1)
return nil
end,
0)
caster:SetContextThink(DoUniqueString("thtd_soga_03_spell_effect_delay"),
function()
if GameRules:IsGamePaused() then return 0.03 end
for i=1,6 do
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_soga/ability_soga_01.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint+Vector(math.cos(-math.pi/2+i*math.pi*2/6),math.sin(-math.pi/2+i*math.pi*2/6),0)*400)
ParticleManager:SetParticleControl(effectIndex, 1, targetPoint+Vector(math.cos(-math.pi/2+i*math.pi*2/6),math.sin(-math.pi/2+i*math.pi*2/6),0)*400)
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
for i=1,3 do
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_soga/ability_soga_01.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint+Vector(math.cos(-math.pi/2+i*math.pi*2/3),math.sin(-math.pi/2+i*math.pi*2/3),0)*200)
ParticleManager:SetParticleControl(effectIndex, 1, targetPoint+Vector(math.cos(-math.pi/2+i*math.pi*2/3),math.sin(-math.pi/2+i*math.pi*2/3),0)*200)
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
for i=1,1 do
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_soga/ability_soga_01.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint+Vector(math.cos(-math.pi/2+i*math.pi*2/1),math.sin(-math.pi/2+i*math.pi*2/1),0)*100)
ParticleManager:SetParticleControl(effectIndex, 1, targetPoint+Vector(math.cos(-math.pi/2+i*math.pi*2/1),math.sin(-math.pi/2+i*math.pi*2/1),0)*100)
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
return nil
end,
1.1)
caster:SetContextThink(DoUniqueString("thtd_soga_03_spell_delay"),
function()
if GameRules:IsGamePaused() then return 0.03 end
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.range)
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
if keys.damage_up > 0 and v:HasModifier("modifier_soga_03_debuff") == false then
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_soga_03_debuff", {Duration = keys.duration_time})
end
end
for i=1,18 do
local effectIndex2 = ParticleManager:CreateParticle("particles/heroes/thtd_soga/ability_thtd_soga_lightning.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex2, 0, targetPoint+Vector(math.cos(i*math.pi*2/18),math.sin(i*math.pi*2/18),0)*keys.range)
table.insert(caster.thtd_soga_03_effect_list,effectIndex2)
end
table.insert(caster.thtd_soga_03_rect_last,targetPoint)
return nil
end,
1.3)
end
function OnCreatedSogaComboBuff(keys)
keys.target:AddDamageIncomingMagical(keys.damage_up, "thtd_soga_combo_damage_up")
end
function OnDestroySogaComboBuff(keys)
keys.target:AddDamageIncomingMagical("thtd_soga_combo_damage_up")
end

View File

@@ -0,0 +1,200 @@
function OnStar01SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
local fairyArea = nil
local hero = caster:GetOwner()
if hero~=nil and hero:IsNull()==false then
local fairyList = GetHeroFairyList(hero)
for k,v in pairs(fairyList) do
if v.star == caster then
fairyArea = v
break
end
end
end
local isTargetInArea = false
if fairyArea ~= nil then
local pos1 = fairyArea.sunny:GetAbsOrigin()
local pos2 = fairyArea.star:GetAbsOrigin()
local pos3 = fairyArea.luna:GetAbsOrigin()
isTargetInArea = IsInTriangle(pos1,pos2,pos3,targetPoint)
local center, radius = GetCircleCenterAndRadius(pos1,pos2,pos3)
local targetsTotal = {}
local fairyTargets = THTD_FindUnitsInRadius(caster,center,radius)
for _,v in pairs(fairyTargets) do
if v~=nil and v:IsNull()==false and v:IsAlive() and IsUnitInFairy(fairyArea,v) then
targetsTotal[v:GetEntityIndex()] = v
end
end
for k,v in pairs(targetsTotal) do
OnStar01Damage(keys,v:GetOrigin())
end
end
if not isTargetInArea then
OnStar01Damage(keys,targetPoint)
end
end
function OnStar01Damage(keys,targetPoint)
local caster = EntIndexToHScript(keys.caster_entindex)
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_star/ability_star_01.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
ParticleManager:DestroyParticleSystem(effectIndex,false)
caster:SetContextThink(DoUniqueString("ability_star_01_delay"),
function()
if GameRules:IsGamePaused() then return 0.03 end
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.range)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability)
for k,v in pairs(targets) do
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_star_01_slow", {Duration = keys.duration_time})
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
return nil
end,
0.5)
end
function OnStar02SpellStart(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local targetPoint = keys.target_points[1]
local fairyArea = nil
local hero = caster:GetOwner()
if hero~=nil and hero:IsNull()==false then
local fairyList = GetHeroFairyList(hero)
for k,v in pairs(fairyList) do
if v.star == caster then
fairyArea = v
break
end
end
end
local isTargetInArea = false
if fairyArea ~= nil then
local pos1 = fairyArea.sunny:GetAbsOrigin()
local pos2 = fairyArea.star:GetAbsOrigin()
local pos3 = fairyArea.luna:GetAbsOrigin()
isTargetInArea = IsInTriangle(pos1,pos2,pos3,targetPoint)
local center, radius = GetCircleCenterAndRadius(pos1,pos2,pos3)
local pos10 = GetTwoVectorSub(center, pos1, 2/1)
local pos20 = GetTwoVectorSub(center, pos2, 2/1)
local pos30 = GetTwoVectorSub(center, pos3, 2/1)
local star_points = {}
table.insert(star_points, center)
table.insert(star_points, pos10)
table.insert(star_points, pos20)
table.insert(star_points, pos30)
table.insert(star_points, GetTwoVectorSub(pos10, pos20, 1/1))
table.insert(star_points, GetTwoVectorSub(pos20, pos30, 1/1))
table.insert(star_points, GetTwoVectorSub(pos30, pos10, 1/1))
local time = keys.max_count * 0.2
local count = 0
caster:SetContextThink(DoUniqueString("ability_star_02_delay"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if time < 0 then return nil end
if fairyArea.sunny==nil or fairyArea.sunny:IsNull() or fairyArea.sunny:THTD_IsHidden() then return nil end
if fairyArea.star==nil or fairyArea.star:IsNull() or fairyArea.star:THTD_IsHidden() then return nil end
if fairyArea.luna==nil or fairyArea.luna:IsNull() or fairyArea.luna:THTD_IsHidden() then return nil end
for _, pos in pairs(star_points) do
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_star/ability_star_01.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, pos)
ParticleManager:DestroyParticleSystem(effectIndex,false)
end
if count > 0 and count % 2 == 0 then
local targetsTotal = {}
local targets = THTD_FindUnitsInRadius(caster,center,radius)
for _,v in pairs(targets) do
if v~=nil and v:IsNull()==false and v:IsAlive() and IsUnitInFairy(fairyArea,v) then
table.insert(targetsTotal, v)
end
end
targets = {}
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * 2 * (1 + keys.damage_up/100)^count
for _, v in pairs(targetsTotal) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
end
count = count + 1
time = time - 0.2
return 0.2
end,
0)
end
if not isTargetInArea then
OnStar02Damage(keys,targetPoint)
end
end
function OnStar02Damage(keys,targetPoint)
local caster = EntIndexToHScript(keys.caster_entindex)
local time = keys.max_count * 0.2
local count = 0
caster:SetContextThink(DoUniqueString("ability_star_02_delay"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if time < 0 then return nil end
local effectIndex = ParticleManager:CreateParticle("particles/heroes/thtd_star/ability_star_01.vpcf", PATTACH_CUSTOMORIGIN, caster)
ParticleManager:SetParticleControl(effectIndex, 0, targetPoint)
ParticleManager:DestroyParticleSystem(effectIndex,false)
if count > 0 and count % 2 == 0 then
caster:SetContextThink(DoUniqueString("ability_star_02_delay"),
function()
local targets = THTD_FindUnitsInRadius(caster,targetPoint,keys.range)
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * 2 * (1 + keys.damage_up/100)^count
for k,v in pairs(targets) do
local DamageTable = {
ability = keys.ability,
victim = v,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
end
return nil
end,
0.5)
end
count = count + 1
time = time - 0.2
return 0.2
end,
0)
end

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