Skip to content

Commit

Permalink
#216 Added gatherer_settings.kv
Browse files Browse the repository at this point in the history
  • Loading branch information
MNoya committed May 28, 2016
1 parent 11ce6a8 commit 4edaf66
Show file tree
Hide file tree
Showing 10 changed files with 581 additions and 298 deletions.
53 changes: 0 additions & 53 deletions game/dota_addons/dotacraft/scripts/kv/buildings.kv

This file was deleted.

25 changes: 25 additions & 0 deletions game/dota_addons/dotacraft/scripts/kv/gatherer_settings.kv
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"gatherer_settings"
{
"TreeRadius" "50"
"TreeHeath" "50"
"MinDistanceToTree" "200"
"MinDistanceToMine" "300"

"deposits"
{
"human_town_hall" "gold,lumber"
"human_keep" "gold,lumber"
"human_castle" "gold,lumber"
"human_lumber_mill" "lumber"

"orc_great_hall" "gold,lumber"
"orc_stronghold" "gold,lumber"
"orc_fortress" "gold,lumber"
"orc_war_mill" "lumber"

"undead_necropolis" "gold,lumber"
"undead_halls_of_the_dead" "gold,lumber"
"undead_citadel" "gold,lumber"
"undead_graveyard" "lumber"
}
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
"undead_gather"
// Acolyte Only
"undead_gather_gold"
{
"BaseClass" "ability_datadriven"
"AbilityTextureName" "undead_gather"
"AbilityTextureName" "undead_gather_gold"
"MaxLevel" "1"

"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_UNIT_TARGET"
"AbilityUnitTargetTeam" "DOTA_UNIT_TARGET_TEAM_BOTH"
"AbilityUnitTargetType" "DOTA_UNIT_TARGET_BASIC | DOTA_UNIT_TARGET_TREE | DOTA_UNIT_TARGET_BUILDING | DOTA_UNIT_TARGET_HERO"
"AbilityUnitTargetFlags" "DOTA_UNIT_TARGET_FLAG_INVULNERABLE"

"GoldMineTarget" "undead_haunted_gold_mine"
"GoldMineBuilding" "undead_haunted_gold_mine"
"GoldGainInterval" "5"
"GoldPerInterval" "10"
"DamageMine" "10"

"AbilitySpecial"
{
// Acolyte Only
"01"
{
"var_type" "FIELD_INTEGER"
Expand All @@ -23,30 +26,227 @@
{
"var_type" "FIELD_INTEGER"
"gold_per_interval" "10"
}
}
}

// Ghoul Only
"03"
"OnAbilityPhaseStart"
{
"RunScript"
{
"var_type" "FIELD_INTEGER"
"ghoul_lumber_capacity" "20" //Can be upgraded
"ScriptFile" "units/gather.lua"
"Function" "Gather"
}
}

// regular gather stuff
"04"
"Modifiers"
{
// LUMBER GATHER
"modifier_on_order_cancel_lumber"
{
"var_type" "FIELD_INTEGER"
"lumber_capacity" "20" //Can be upgraded
"IsHidden" "1"
"OnOrder"
{
"RunScript"
{
"ScriptFile" "units/gather.lua"
"Function" "CancelGather"
}
"RemoveModifier"
{
"ModifierName" "modifier_on_order_cancel_lumber"
"Target" "CASTER"
}
}

"States"
{
"MODIFIER_STATE_NO_UNIT_COLLISION" "MODIFIER_STATE_VALUE_ENABLED"
}
}
"05"

"modifier_gathering_lumber"
{
"var_type" "FIELD_INTEGER"
"lumber_per_hit" "2" //also deals this much damage to tree
"OverrideAnimation" "ACT_DOTA_ATTACK"
"IsHidden" "1"
"OnOrder"
{
"RunScript"
{
"ScriptFile" "units/gather.lua"
"Function" "CancelGather"
}
}

// Lumber Gain
"ThinkInterval" "1.0"
"OnIntervalThink"
{
"RunScript"
{
"ScriptFile" "units/gather.lua"
"Function" "GatherLumber"
}
}
}
// END LUMBER GATHER

// GOLD GATHER
"modifier_on_order_cancel_gold"
{
"IsHidden" "1"
"OnOrder"
{
"RunScript"
{
"ScriptFile" "units/gather.lua"
"Function" "CancelGather"
}
}
}

"modifier_gathering_gold"
{
"IsHidden" "0"
"OverrideAnimation" "ACT_DOTA_CHANNEL_ABILITY_3"
"OnOrder"
{
"RunScript"
{
"ScriptFile" "units/gather.lua"
"Function" "CancelGather"
}
}

"OnDeath"
{
"RunScript"
{
"ScriptFile" "units/gather.lua"
"Function" "CancelGather"
}
}

"OnUnitMoved"
{
"RunScript"
{
"ScriptFile" "units/gather.lua"
"Function" "CancelGather"
}
}

"ThinkInterval" "%gold_interval"
"OnIntervalThink"
{
"RunScript"
{
"ScriptFile" "units/gather.lua"
"Function" "GoldGain"
}
}

"States"
{
"MODIFIER_STATE_NO_UNIT_COLLISION" "MODIFIER_STATE_VALUE_ENABLED"
"MODIFIER_STATE_NO_HEALTH_BAR" "MODIFIER_STATE_VALUE_ENABLED"
}
}

// END GOLD GATHER

// REPAIR
"modifier_on_order_cancel_repair"
{
"IsHidden" "1"
"OnOrder"
{
"RunScript"
{
"ScriptFile" "units/gather.lua"
"Function" "CancelGather"
}
}
}

"modifier_builder_repairing"
{
"OverrideAnimation" "ACT_DOTA_ATTACK"

"OnCreated"
{
"RunScript"
{
"ScriptFile" "units/gather.lua"
"Function" "CancelGather"
}

"RunScript"
{
"ScriptFile" "units/builder.lua"
"Function" "BuilderRepairing"
}
}

"OnOrder"
{
"RunScript"
{
"ScriptFile" "units/builder.lua"
"Function" "BuilderStopRepairing"
}
}

"ThinkInterval" "1.0"
"OnIntervalThink"
{
"RunScript"
{
"ScriptFile" "units/builder.lua"
"Function" "RepairAnimation"
}
}
}

// Stackable modifier on the building
"modifier_repairing_building"
{
"Attributes" "MODIFIER_ATTRIBUTE_MULTIPLE"
"ThinkInterval" "1.0"
"OnIntervalThink"
{
"RunScript"
{
"ScriptFile" "units/builder.lua"
"Function" "Repair"
}
}
}
"06"
// END REPAIR
}
}

// Ghoul Only
"undead_gather_lumber"
{
"BaseClass" "ability_datadriven"
"AbilityTextureName" "undead_gather_lumber"
"MaxLevel" "1"

"AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_UNIT_TARGET"
"AbilityUnitTargetTeam" "DOTA_UNIT_TARGET_TEAM_BOTH"
"AbilityUnitTargetType" "DOTA_UNIT_TARGET_BASIC | DOTA_UNIT_TARGET_TREE | DOTA_UNIT_TARGET_BUILDING | DOTA_UNIT_TARGET_HERO"
"AbilityUnitTargetFlags" "DOTA_UNIT_TARGET_FLAG_INVULNERABLE"

"LumberGainInterval" "1"
"LumberPerInterval" "2"
"DamageTree" "2"

"AbilitySpecial"
{
"01"
{
"var_type" "FIELD_INTEGER"
"damage_to_tree" "2" //mainly here for nightelf wisp to deal 0 damage to trees without having to do a race check
"lumber_capacity" "20" //Can be upgraded
}
}

Expand Down
Loading

0 comments on commit 4edaf66

Please sign in to comment.