Skip to content

Commit

Permalink
feature/effect_reorg (#324)
Browse files Browse the repository at this point in the history
* cleanup some deprecated scenes, move resource controller to abc

* added trait data, added unit_attribute class

* update docs

* more docs updates

* reorg files

* fix circular imports

* added dodge and heal, began moving heat to Stats, reorganised some assets

* moved health to stats and removed resources component

* fix stat  value assignment, update stat docstings

* call healing system

* simplify particle interface, document and type hint

* changed -1 to INFINITE, where appropriate

* added dodge and regen to unit data, reformatted unit stats window

* update docstring
  • Loading branch information
Snayff committed May 24, 2022
1 parent d5dc80c commit d5cd436
Show file tree
Hide file tree
Showing 100 changed files with 1,051 additions and 1,089 deletions.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
3 changes: 0 additions & 3 deletions assets/ui/icons/overworld.png

This file was deleted.

3 changes: 0 additions & 3 deletions assets/ui/icons/town.png

This file was deleted.

File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
8 changes: 8 additions & 0 deletions data/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ unit_base_values:
weight: 0
crit_chance: 0
penetration: 0
dodge: 1
regen: 0
tier_2:
ammo: 0
attack: 0
Expand All @@ -49,6 +51,8 @@ unit_base_values:
weight: 0
crit_chance: 0
penetration: 0
dodge: 1
regen: 0
tier_3:
ammo: 0
attack: 0
Expand All @@ -64,6 +68,8 @@ unit_base_values:
weight: 0
crit_chance: 0
penetration: 0
dodge: 1
regen: 0
tier_4:
ammo: 0
attack: 0
Expand All @@ -79,6 +85,8 @@ unit_base_values:
weight: 0
crit_chance: 0
penetration: 0
dodge: 1
regen: 0
unit_properties:
injuries_before_death: 3
unit_tier_occur_rates:
Expand Down
23 changes: 19 additions & 4 deletions data/tooltips.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Unit stats
mundane_defence:
title: "Mundane Defence"
text: "Resistance to mundane damage. Reduces after taking damage."
Expand Down Expand Up @@ -42,10 +43,6 @@ damage_type:
title: "Damage Type"
text: "Type of damage dealt by an attack."
image: "damage_type"
gold:
title: "Gold"
text: "Gold can be exchanged for goods and services."
image: "gold"
health:
title: "Health"
text: "How much damage can be taken before an entity dies."
Expand All @@ -62,10 +59,28 @@ range:
title: "Range"
text: "How far away an entity's attack can reach."
image: "range"
dodge:
title: "Dodge"
text: "Chance to ignore an attack entirely."
image: dodge
regen:
title: "Regeneration"
text: "Amount of health gained per second."
image: regen

# Resources
gold:
title: "Gold"
text: "Gold can be exchanged for goods and services."
image: "gold"

# Commander Stats
ally:
title: "Ally"
text: "Those who are willing to join you in your ambitions."
image: null

# Factions
aberrations_of_nature:
title: "Aberrations of Nature"
text: "Self-identified as the Naturists, they are widely known as the Aberrations of Nature. Brought into existence by the quirks of fate, or the whims of the gods, they desire most to be acknowledged as alive. Champions of the natural order of the world they despise the Hammerites above all else, and will stop at nothing to prevent them from claiming rule, as this threatens their entire existence."
Expand Down
12 changes: 12 additions & 0 deletions data/traits/armoured.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: Armoured
description: Particularly resistant to damage, especially from ranged attacks.
effects:
- name: DamageResistanceEffect
target: self
attack_type: ranged
modifier: -20
- name: DamageResistanceEffect
target: self
attack_type: melee
modifier: -10
15 changes: 15 additions & 0 deletions data/traits/living_dead.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Living Dead
description: |
The dead have risen! Though their form slowly pulls itself together while they
walk the land it eschews outside helps.
Self regen and cant be healed by others.
effects:
- name: StatsEffect
target: self
attribute: regen
modifier: 20%*max_health
- name: StatsEffect
target: self
attribute: CanBeHealedByOther
state: false
12 changes: 12 additions & 0 deletions data/traits/lucky.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: Lucky
description: Increased <crit_chance> and <dodge>.
effects:
- name: StatsEffect
target: self
attribute: crit_chance
modifier: 10
- name: StatsEffect
target: self
attribute: dodge
modifier: 5
10 changes: 10 additions & 0 deletions data/traits/spiky.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Spiky
description: A prickly exterior. Return damage on being attacked in melee.
effects:
- name: DamageEffect
target: attacker
received_attack_type: melee
trigger: OnAttacked
amount: 10
damage_type: mundane
2 changes: 2 additions & 0 deletions data/units/bandit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ attack_speed: 1.0
count: 5
crit_chance: 1
damage_type: mundane
dodge: 0
faction: chivalric_order
gold_cost: 0
health: 1
Expand All @@ -12,6 +13,7 @@ move_speed: 15
mundane_defence: 1
penetration: 10
range: 200
regen: 0
size: 1
tier: 1
type: bandit
Expand Down
2 changes: 2 additions & 0 deletions data/units/cavalier_of_the_gleaming_dawn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ attack_speed: 1.3
count: 3
crit_chance: 1
damage_type: mundane
dodge: 0
faction: chivalric_order
gold_cost: 0
health: 50
Expand All @@ -12,6 +13,7 @@ move_speed: 80
mundane_defence: 10
penetration: 10
range: 10
regen: 0
size: 1
tier: 3
type: cavalier_of_the_gleaming_dawn
Expand Down
2 changes: 2 additions & 0 deletions data/units/caveborn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ attack_speed: 1.0
count: 5
crit_chance: 1
damage_type: mundane
dodge: 0
faction: wasters
gold_cost: 0
health: 1
Expand All @@ -12,6 +13,7 @@ move_speed: 15
mundane_defence: 1
penetration: 10
range: 200
regen: 0
size: 1
tier: 1
type: caveborn
Expand Down
2 changes: 2 additions & 0 deletions data/units/conscript_bowman.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ attack_speed: 1.0
count: 5
crit_chance: 1
damage_type: mundane
dodge: 0
faction: members_of_the_court
gold_cost: 0
health: 1
Expand All @@ -12,6 +13,7 @@ move_speed: 15
mundane_defence: 1
penetration: 10
range: 200
regen: 0
size: 1
tier: 1
type: conscript_bowman
Expand Down
2 changes: 2 additions & 0 deletions data/units/disciple_of_the_hammer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ attack_speed: 0.7
count: 6
crit_chance: 1
damage_type: mundane
dodge: 0
faction: hammerites
gold_cost: 0
health: 10
Expand All @@ -12,6 +13,7 @@ move_speed: 30
mundane_defence: 2
penetration: 10
range: 0
regen: 0
size: 1
tier: 1
type: disciple_of_the_hammer
Expand Down
2 changes: 2 additions & 0 deletions data/units/earth_elemental.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ attack_speed: 0.5
count: 3
crit_chance: 1
damage_type: mundane
dodge: 0
faction: aberrations_of_nature
gold_cost: 0
health: 25
Expand All @@ -12,6 +13,7 @@ move_speed: 15
mundane_defence: 5
penetration: 10
range: 0
regen: 0
size: 1
tier: 1
type: earth_elemental
Expand Down
2 changes: 2 additions & 0 deletions data/units/gremlin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ attack_speed: 1.0
count: 5
crit_chance: 1
damage_type: mundane
dodge: 0
faction: swarm
gold_cost: 0
health: 1
Expand All @@ -12,6 +13,7 @@ move_speed: 15
mundane_defence: 1
penetration: 10
range: 200
regen: 0
size: 1
tier: 1
type: gremlin
Expand Down
2 changes: 2 additions & 0 deletions data/units/harpy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ attack_speed: 1.0
count: 5
crit_chance: 1
damage_type: mundane
dodge: 0
faction: wasters
gold_cost: 0
health: 1
Expand All @@ -12,6 +13,7 @@ move_speed: 15
mundane_defence: 1
penetration: 10
range: 200
regen: 0
size: 1
tier: 1
type: harpy
Expand Down
2 changes: 2 additions & 0 deletions data/units/imp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ attack_speed: 1.0
count: 5
crit_chance: 1
damage_type: mundane
dodge: 0
faction: swarm
gold_cost: 0
health: 1
Expand All @@ -12,6 +13,7 @@ move_speed: 15
mundane_defence: 1
penetration: 10
range: 200
regen: 0
size: 1
tier: 1
type: imp
Expand Down
2 changes: 2 additions & 0 deletions data/units/infantryman.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ attack_speed: 1.0
count: 7
crit_chance: 1
damage_type: mundane
dodge: 0
faction: imperial_forces
gold_cost: 0
health: 3
Expand All @@ -12,6 +13,7 @@ move_speed: 50
mundane_defence: 1
penetration: 10
range: 200
regen: 0
size: 1
tier: 1
type: infantryman
Expand Down
2 changes: 2 additions & 0 deletions data/units/peasant_spearman.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ attack_speed: 1.2
count: 12
crit_chance: 1
damage_type: mundane
dodge: 0
faction: members_of_the_court
gold_cost: 0
health: 5
Expand All @@ -12,6 +13,7 @@ move_speed: 30
mundane_defence: 1
penetration: 10
range: 50
regen: 0
size: 1
tier: 1
type: peasant_spearman
Expand Down
2 changes: 2 additions & 0 deletions data/units/skirmisher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ attack_speed: 1.0
count: 10
crit_chance: 1
damage_type: mundane
dodge: 0
faction: imperial_forces
gold_cost: 0
health: 5
Expand All @@ -12,6 +13,7 @@ move_speed: 40
mundane_defence: 1
penetration: 10
range: 20
regen: 0
size: 1
tier: 1
type: skirmisher
Expand Down
2 changes: 2 additions & 0 deletions data/units/thug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ attack_speed: 1.0
count: 5
crit_chance: 1
damage_type: mundane
dodge: 0
faction: chivalric_order
gold_cost: 0
health: 1
Expand All @@ -12,6 +13,7 @@ move_speed: 15
mundane_defence: 1
penetration: 10
range: 200
regen: 0
size: 1
tier: 1
type: thug
Expand Down
Loading

0 comments on commit d5cd436

Please sign in to comment.