Решено пассивный berserkers call с шансом при ударе по герою

dEN5

Пользователь
10 Фев 2019
25
0
steamcommunity.com
Проект
MADNESS: PROJECT ABADDON
не могу сделать berserkers_call пассивным
с шансом при ударе по герою.
.
вот что получилось .

Код:
"berserkers_call_pass"
    {
        "BaseClass"        "ability_datadriven"
        "AbilityBehavior"        "DOTA_ABILITY_BEHAVIOR_PASSIVE"
        "SpellImmunityType"        "SPELL_IMMUNITY_ENEMIES_YES"
        "AbilityTextureName"        "axe_berserkers_call"
        "FightRecapLevel"        "1"
        "precache"
        {
            "soundfile"        "soundevents/game_sounds_heroes/game_sounds_axe.vsndevts"
            "particle"        "particles/status_fx/status_effect_beserkers_call.vpcf"
        }
        "AbilitySpecial"
        {
            "01"
            {
                "var_type"        "FIELD_INTEGER"
                "radius"        "300"
            }
            "02"
            {
                "var_type"        "FIELD_INTEGER"
                "bonus_armor"        "40"
            }
            "03"
            {
                "var_type"        "FIELD_INTEGER"
                "duration"        "1"
            }
            "04"
            {
                "var_type"        "FIELD_INTEGER"
                "trigger_chance"        "35"
            }
        }
        "Modifiers"
        {
            "modifier_beserkers_call_atacked"
            {
                "Passive"        "0"
                "IsBuff"        "0"
                "IsDebuff"        "0"
                "IsHidden"        "0"
                "IsPurgable"        "0"
                "OnAttacked"
                {
                    "Random"
                    {
                        "Chance"        "%trigger_chance"
                        "PseudoRandom"        "DOTA_PSEUDO_RANDOM_LYCAN_CRIT"
                        "OnSuccess"
                        {
                            "ApplyModifier"
                            {
                                "Target"        "CASTER"
                                "ModifierName"        "modifier_berserkers_call_caster_datadriven"
                            }
                            "modifier_berserkers_call_caster_datadriven"
                            {
                                "Passive"        "0"
                                "IsBuff"        "1"
                                "IsDebuff"        "0"
                                "IsHidden"        "0"
                                "Duration"        "%duration"
                                "Aura"        "modifier_beserkers_call_enemy_datadriven"
                                "Aura_Radius"        "%radius"
                                "Aura_Teams"        "DOTA_UNIT_TARGET_TEAM_ENEMY"
                                "Aura_Types"        "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_BASIC"
                                "Aura_Flags"        "DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES"
                                "OnCreated"
                                {
                                    "AttachEffect"
                                    {
                                        "Target"        "CASTER"
                                        "EffectName"        "particles/units/heroes/hero_axe/axe_beserkers_call_owner.vpcf"
                                        "EffectAttachType"        "follow_origin"
                                        "ControlPoints"
                                        {
                                            "02"        "%radius 1 1"
                                        }
                                        "ControlPointEntities"
                                        {
                                            "CASTER"        "follow_origin"
                                        }
                                    }
                                }
                                "Properties"
                                {
                                    "MODIFIER_PROPERTY_PHYSICAL_ARMOR_BONUS"        "%bonus_armor"
                                }
                            }
                            "modifier_beserkers_call_enemy_datadriven"
                            {
                                "Passive"        "0"
                                "IsBuff"        "0"
                                "IsDebuff"        "1"
                                "IsHidden"        "0"
                                "IsPurgable"        "0"
                                "ThinkInterval"        "0.1"
                                "StatusEffectName"        "particles/status_fx/status_effect_beserkers_call.vpcf"
                                "StatusEffectPriority"        "10"
                                "OnIntervalThink"
                                {
                                    "RunScript"
                                    {
                                        "ScriptFile"        "npc_abilities/berserkers_call.lua"
                                        "Function"        "BerserkersCall"
                                    }
                                }
                                "OnDestroy"
                                {
                                    "RunScript"
                                    {
                                        "ScriptFile"        "npc_abilities/berserkers_call.lua"
                                        "Function"        "BerserkersCallEnd"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }

}
спасибо, если помогли.
 
Последнее редактирование:

Niker323

Пользователь
25 Сен 2018
43
27
Проект
Element Arena
не могу сделать berserkers_call пассивным .
вот что получилось .

Код:
    "berserkers_call_PASSIVE"
    {
        "BaseClass"        "ability_datadriven"
        "AbilityBehavior"        "DOTA_ABILITY_BEHAVIOR_PASSIVE"
        "SpellImmunityType"        "SPELL_IMMUNITY_ENEMIES_YES"
        "AbilityTextureName"        "axe_berserkers_call"
        "AbilityCooldown"        "16 14 12 10"
        "AbilityDamage"        "0 0 0 0"
        "FightRecapLevel"        "1"
        "precache"
        {
            "soundfile"        "soundevents/game_sounds_heroes/game_sounds_axe.vsndevts"
            "particle"        "particles/status_fx/status_effect_beserkers_call.vpcf"
        }
        "AbilitySpecial"
        {
            "01"
            {
                "var_type"        "FIELD_INTEGER"
                "radius"        "300"
            }
            "02"
            {
                "var_type"        "FIELD_INTEGER"
                "bonus_armor"        "40"
            }
            "03"
            {
                "var_type"        "FIELD_FLOAT"
                "duration"        "2.0 2.4 2.8 3.2"
            }
            "04"
            {
                "var_type"        "FIELD_INTEGER"
                "Chance_call"        "100"
            }
        }
        "ActOnTargets"
        {
            "Target"
            {
                "Center"        "CASTER"
                "Radius"        "%radius"
                "Teams"        "DOTA_UNIT_TARGET_TEAM_ENEMY"
                "Types"        "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_BASIC"
                "Flags"        "DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES | DOTA_UNIT_TARGET_FLAG_INVULNERABLE"
            }
            "Action"
            {
                "ApplyModifier"
                {
                    "ModifierName"        "modifier_beserkers_call_enemy_datadriven"
                    "Target"        "TARGET"
                    "Duration"        "%duration"
                }
            }
        }
    }
    "Modifiers"
    {
        "modifier_berserkers_call_caster_datadriven"
        {
            "Passive"        "0"
            "IsBuff"        "1"
            "IsDebuff"        "0"
            "IsHidden"        "0"
            "IsPurgable"        "0"
            "OnCreated"
            {
                "AttachEffect"
                {
                    "Target"        "CASTER"
                    "EffectName"        "particles/units/heroes/hero_axe/axe_beserkers_call_owner.vpcf"
                    "EffectAttachType"        "follow_origin"
                    "ControlPoints"
                    {
                        "02"        "%radius 1 1"
                    }
                    "ControlPointEntities"
                    {
                        "CASTER"        "follow_origin"
                    }
                }
            }
            "Properties"
            {
                "MODIFIER_PROPERTY_PHYSICAL_ARMOR_BONUS"        "%bonus_armor"
            }
        }
        "modifier_beserkers_call_enemy_datadriven"
        {
            "Passive"        "0"
            "IsBuff"        "0"
            "IsDebuff"        "1"
            "IsHidden"        "0"
            "IsPurgable"        "0"
            "ThinkInterval"        "0.1"
            "StatusEffectName"        "particles/status_fx/status_effect_beserkers_call.vpcf"
            "StatusEffectPriority"        "10"
            "OnIntervalThink"
            {
                "RunScript"
                {
                    "ScriptFile"        "npc_abilities/berserkers_call.lua"
                    "Function"        "BerserkersCall"
                }
            }
            "OnDestroy"
            {
                "RunScript"
                {
                    "ScriptFile"        "npc_abilities/berserkers_call.lua"
                    "Function"        "BerserkersCallEnd"
                }
            }
        }
    }
   
    "OnAttacked"
    {
        "Random"
        {
            "Chance"        "%Chance_call"
            "PseudoRandom"        "DOTA_PSEUDO_RANDOM_SNIPER_HEADSHOT"
            "OnSuccess"
            {
                "ApplyModifier"
                {
                    "Target"        "CASTER"
                    "ModifierName"        "modifier_berserkers_call_caster_datadriven"
                    "Duration"        "%Duration"
                }
            }
        }
    }

}
спасибо, если помогли.
Код:
"berserkers_call_pass"
{
    "BaseClass"        "ability_datadriven"
    "AbilityBehavior"        "DOTA_ABILITY_BEHAVIOR_PASSIVE"
    "SpellImmunityType"        "SPELL_IMMUNITY_ENEMIES_YES"
    "AbilityTextureName"        "axe_berserkers_call"
    "FightRecapLevel"        "1"
    "precache"
    {
        "soundfile"        "soundevents/game_sounds_heroes/game_sounds_axe.vsndevts"
        "particle"        "particles/status_fx/status_effect_beserkers_call.vpcf"
    }
    "AbilitySpecial"
    {
        "01"
        {
            "var_type"        "FIELD_INTEGER"
            "radius"        "300"
        }
        "02"
        {
            "var_type"        "FIELD_INTEGER"
            "bonus_armor"        "40"
        }
    }
    "Modifiers"
    {
        "modifier_berserkers_call_caster_datadriven"
        {
            "Passive"        "1"
            "IsBuff"        "1"
            "IsDebuff"        "0"
            "IsHidden"        "0"
            "IsPurgable"        "0"
            
            "Aura"                "modifier_beserkers_call_enemy_datadriven"
            "Aura_Radius"        "%radius"
            "Aura_Teams"        "DOTA_UNIT_TARGET_TEAM_ENEMY"
            "Aura_Types"        "DOTA_UNIT_TARGET_HERO | DOTA_UNIT_TARGET_BASIC"
            "Aura_Flags"        "DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES"
            
            "OnCreated"
            {
                "AttachEffect"
                {
                    "Target"        "CASTER"
                    "EffectName"        "particles/units/heroes/hero_axe/axe_beserkers_call_owner.vpcf"
                    "EffectAttachType"        "follow_origin"
                    "ControlPoints"
                    {
                        "02"        "%radius 1 1"
                    }
                    "ControlPointEntities"
                    {
                        "CASTER"        "follow_origin"
                    }
                }
            }
            "Properties"
            {
                "MODIFIER_PROPERTY_PHYSICAL_ARMOR_BONUS"        "%bonus_armor"
            }
        }
        "modifier_beserkers_call_enemy_datadriven"
        {
            "Passive"        "0"
            "IsBuff"        "0"
            "IsDebuff"        "1"
            "IsHidden"        "0"
            "IsPurgable"        "0"
            
            "StatusEffectName"        "particles/status_fx/status_effect_beserkers_call.vpcf"
            "StatusEffectPriority"        "10"
            
            "ThinkInterval"        "0.1"
            "OnIntervalThink"
            {
                "RunScript"
                {
                    "ScriptFile"        "npc_abilities/berserkers_call.lua"
                    "Function"        "BerserkersCall"
                }
            }
            "OnDestroy"
            {
                "RunScript"
                {
                    "ScriptFile"        "npc_abilities/berserkers_call.lua"
                    "Function"        "BerserkersCallEnd"
                }
            }
        }
    }
}
 

SniperX

Друзья CG
26 Фев 2018
360
41
steamcommunity.com
Проект
Белоозерская Потасовка - Updated
в modifier_beserkers_call_atacked у тебя Passive стоит 0, поменяй на 1 и всё будет ОК
 
Реклама: