-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue-26: Update test_health.gd to use the cards, fix a bug with Dama…
…ge All card by adding EffectDamageAll.gd (#41) * Issue-26: Update test_health.gd to use the cards, fix a big with Damage All card by adding EffectDamageAll.gd * Issue-26: Update test_health.gd with array of enemies and comments * Issue-26: Resolve Default Cards in Test Scene * Issue-26: Update comment on test_health.gd
- Loading branch information
1 parent
836dd3a
commit fcff068
Showing
4 changed files
with
97 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class_name EffectDamageAll extends EffectBase | ||
|
||
func apply_effect(caster: Entity, target: Entity, value: int) -> void: | ||
var target_damage_data: DealDamageData = DealDamageData.new() | ||
var party = target.get_party_component().party | ||
target_damage_data.damage = value | ||
target_damage_data.caster = caster | ||
for party_target in party: | ||
party_target.get_health_component().deal_damage(target_damage_data) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,20 @@ | ||
[gd_resource type="Resource" script_class="CardBase" load_steps=2 format=3 uid="uid://0x385c3nuq8f"] | ||
[gd_resource type="Resource" script_class="CardBase" load_steps=6 format=3 uid="uid://0x385c3nuq8f"] | ||
|
||
[ext_resource type="Script" path="res://Cards/Effects/EffectDamageAll.gd" id="1_5m74j"] | ||
[ext_resource type="Script" path="res://Cards/CardBase.gd" id="1_j02oq"] | ||
[ext_resource type="Script" path="res://Cards/Effects/EffectData.gd" id="2_kr6on"] | ||
|
||
[sub_resource type="Resource" id="Resource_1loka"] | ||
script = ExtResource("1_5m74j") | ||
|
||
[sub_resource type="Resource" id="Resource_s752v"] | ||
script = ExtResource("2_kr6on") | ||
effect = SubResource("Resource_1loka") | ||
value = 2 | ||
|
||
[resource] | ||
script = ExtResource("1_j02oq") | ||
application_type = null | ||
card_title = "Damage All" | ||
card_description = "Deal 2 damage to all enemies" | ||
card_effects_data = null | ||
card_effects_data = Array[ExtResource("2_kr6on")]([SubResource("Resource_s752v")]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters