File tree Expand file tree Collapse file tree 3 files changed +29
-24
lines changed
Expand file tree Collapse file tree 3 files changed +29
-24
lines changed Original file line number Diff line number Diff line change 1+ extends Node2D
2+
3+ class_name PartyMember
4+
5+ onready var battler = $ Battler
6+
7+ func _ready ():
8+ battler .stats .reset ()
9+
10+ func update_stats (stats : CharacterStats ):
11+ """
12+ Update this character's stats to match select changes
13+ that occurred during combat or through menu actions
14+ """
15+ battler .stats = stats
16+
17+ func ready_for_combat ():
18+ var copy = battler .duplicate ()
19+ return copy
Original file line number Diff line number Diff line change 11[gd_scene load_steps =3 format =2 ]
22
3- [ext_resource path ="res://combat/battlers/Battler.tscn" type ="PackedScene" id =1 ]
4-
5- [sub_resource type ="GDScript" id =1 ]
6-
7- script/source = "extends Node2D
8-
9- onready var battler = $ Battler
10-
11- func _ready ():
12- battler .stats .reset ()
13-
14- func update_stats (stats : CharacterStats ):
15- \"\"\"
16- Update this character 's stats to match select changes
17- that occurred during combat or through menu actions
18- \"\"\"
19- battler.stats = stats
20-
21- func ready_for_combat():
22- var copy = battler.duplicate()
23- return copy
24- "
3+ [ext_resource path ="res://party/PartyMember.gd" type ="Script" id =1 ]
4+ [ext_resource path ="res://combat/battlers/Battler.tscn" type ="PackedScene" id =2 ]
255
266[node name ="PartyMember" type ="Node2D" ]
27- script = SubResource ( 1 )
7+ script = ExtResource ( 1 )
288
29- [node name="Battler" parent="." instance=ExtResource( 1 )]
9+ [node name ="Battler" parent ="." instance =ExtResource ( 2 )]
3010
3111
3212[editable path ="Battler" ]
Original file line number Diff line number Diff line change @@ -144,6 +144,11 @@ _global_script_classes=[ {
144144"language" : "GDScript" ,
145145"path" : "res://party/Party.gd"
146146}, {
147+ "base" : "Node2D" ,
148+ "class" : "PartyMember" ,
149+ "language" : "GDScript" ,
150+ "path" : "res://party/PartyMember.gd"
151+ }, {
147152"base" : "Reference" ,
148153"class" : "Pathfinder" ,
149154"language" : "GDScript" ,
@@ -227,6 +232,7 @@ _global_script_class_icons={
227232"ManaBar" : "" ,
228233"MapAction" : "" ,
229234"Party" : "" ,
235+ "PartyMember" : "" ,
230236"Pathfinder" : "" ,
231237"Pawn" : "" ,
232238"PawnActor" : "" ,
You can’t perform that action at this time.
0 commit comments