.
This commit is contained in:
parent
f2d3a371d3
commit
3069b8c1e2
11 changed files with 24 additions and 3 deletions
|
|
@ -8,3 +8,4 @@ class_name Currency
|
||||||
@export var color: Color = Color.PINK
|
@export var color: Color = Color.PINK
|
||||||
@export var wants: Array[Production]
|
@export var wants: Array[Production]
|
||||||
@export var commands: Array[Command] = [preload("res://commands/move_command.tres")]
|
@export var commands: Array[Command] = [preload("res://commands/move_command.tres")]
|
||||||
|
@export var soldier: bool
|
||||||
|
|
|
||||||
|
|
@ -25,3 +25,6 @@ func _input(event: InputEvent) -> void:
|
||||||
|
|
||||||
func get_allegiance():
|
func get_allegiance():
|
||||||
return allegiance.kingdom_name
|
return allegiance.kingdom_name
|
||||||
|
|
||||||
|
func get_combat():
|
||||||
|
return currency.soldier
|
||||||
|
|
|
||||||
|
|
@ -49,4 +49,5 @@ production = Array[ExtResource("1_m37xt")]([ExtResource("2_b0duy"), ExtResource(
|
||||||
description = "arrow go fweeewww"
|
description = "arrow go fweeewww"
|
||||||
color = Color(1.1310726e-06, 0.67725253, 0.15828604, 1)
|
color = Color(1.1310726e-06, 0.67725253, 0.15828604, 1)
|
||||||
wants = Array[ExtResource("1_m37xt")]([SubResource("Resource_ui157"), SubResource("Resource_ah5vq"), SubResource("Resource_2437s"), SubResource("Resource_n5gpp"), SubResource("Resource_b1lqu")])
|
wants = Array[ExtResource("1_m37xt")]([SubResource("Resource_ui157"), SubResource("Resource_ah5vq"), SubResource("Resource_2437s"), SubResource("Resource_n5gpp"), SubResource("Resource_b1lqu")])
|
||||||
|
soldier = true
|
||||||
metadata/_custom_type_script = "uid://hcvynq5fjypj"
|
metadata/_custom_type_script = "uid://hcvynq5fjypj"
|
||||||
|
|
|
||||||
|
|
@ -49,4 +49,5 @@ production = Array[ExtResource("1_cnnt2")]([ExtResource("2_hqcau"), ExtResource(
|
||||||
description = "save a horse ride a cowboy or something."
|
description = "save a horse ride a cowboy or something."
|
||||||
color = Color(1, 0.14509805, 0.08627451, 1)
|
color = Color(1, 0.14509805, 0.08627451, 1)
|
||||||
wants = Array[ExtResource("1_cnnt2")]([SubResource("Resource_ui157"), SubResource("Resource_ah5vq"), SubResource("Resource_2437s"), SubResource("Resource_n5gpp"), SubResource("Resource_b1lqu")])
|
wants = Array[ExtResource("1_cnnt2")]([SubResource("Resource_ui157"), SubResource("Resource_ah5vq"), SubResource("Resource_2437s"), SubResource("Resource_n5gpp"), SubResource("Resource_b1lqu")])
|
||||||
|
soldier = true
|
||||||
metadata/_custom_type_script = "uid://hcvynq5fjypj"
|
metadata/_custom_type_script = "uid://hcvynq5fjypj"
|
||||||
|
|
|
||||||
|
|
@ -132,4 +132,5 @@ description = "*rawrs at you gayly and prehistorically*"
|
||||||
thumbnail = ExtResource("3_bufop")
|
thumbnail = ExtResource("3_bufop")
|
||||||
color = Color(1, 0.48235294, 0, 1)
|
color = Color(1, 0.48235294, 0, 1)
|
||||||
wants = Array[ExtResource("1_qayfp")]([SubResource("Resource_unbv5"), SubResource("Resource_awlnm"), SubResource("Resource_jihtj"), SubResource("Resource_utj6b"), SubResource("Resource_2b5sm"), SubResource("Resource_yq4u0"), SubResource("Resource_hi66y"), SubResource("Resource_mf31s"), SubResource("Resource_gdovn"), SubResource("Resource_ts66k"), SubResource("Resource_gt1pn"), SubResource("Resource_evrxh"), SubResource("Resource_b1bj4"), SubResource("Resource_mjehd"), SubResource("Resource_c6wya"), SubResource("Resource_c4cgt"), SubResource("Resource_n7bnc")])
|
wants = Array[ExtResource("1_qayfp")]([SubResource("Resource_unbv5"), SubResource("Resource_awlnm"), SubResource("Resource_jihtj"), SubResource("Resource_utj6b"), SubResource("Resource_2b5sm"), SubResource("Resource_yq4u0"), SubResource("Resource_hi66y"), SubResource("Resource_mf31s"), SubResource("Resource_gdovn"), SubResource("Resource_ts66k"), SubResource("Resource_gt1pn"), SubResource("Resource_evrxh"), SubResource("Resource_b1bj4"), SubResource("Resource_mjehd"), SubResource("Resource_c6wya"), SubResource("Resource_c4cgt"), SubResource("Resource_n7bnc")])
|
||||||
|
soldier = true
|
||||||
metadata/_custom_type_script = "uid://hcvynq5fjypj"
|
metadata/_custom_type_script = "uid://hcvynq5fjypj"
|
||||||
|
|
|
||||||
|
|
@ -42,4 +42,5 @@ production = Array[ExtResource("1_f1fuf")]([ExtResource("2_s3h3i"), ExtResource(
|
||||||
description = "better hope these guys are loyal."
|
description = "better hope these guys are loyal."
|
||||||
color = Color(0.54509807, 0, 1, 1)
|
color = Color(0.54509807, 0, 1, 1)
|
||||||
wants = Array[ExtResource("1_f1fuf")]([SubResource("Resource_1g3kj"), SubResource("Resource_kmdkm"), SubResource("Resource_3p8gt"), SubResource("Resource_m16xj")])
|
wants = Array[ExtResource("1_f1fuf")]([SubResource("Resource_1g3kj"), SubResource("Resource_kmdkm"), SubResource("Resource_3p8gt"), SubResource("Resource_m16xj")])
|
||||||
|
soldier = true
|
||||||
metadata/_custom_type_script = "uid://hcvynq5fjypj"
|
metadata/_custom_type_script = "uid://hcvynq5fjypj"
|
||||||
|
|
|
||||||
|
|
@ -35,4 +35,5 @@ production = Array[ExtResource("1_626vc")]([ExtResource("2_sa77c"), ExtResource(
|
||||||
description = "Nighty night Knight"
|
description = "Nighty night Knight"
|
||||||
color = Color(0.54901963, 0, 0, 1)
|
color = Color(0.54901963, 0, 0, 1)
|
||||||
wants = Array[ExtResource("1_626vc")]([SubResource("Resource_ui157"), SubResource("Resource_ah5vq"), SubResource("Resource_2437s")])
|
wants = Array[ExtResource("1_626vc")]([SubResource("Resource_ui157"), SubResource("Resource_ah5vq"), SubResource("Resource_2437s")])
|
||||||
|
soldier = true
|
||||||
metadata/_custom_type_script = "uid://hcvynq5fjypj"
|
metadata/_custom_type_script = "uid://hcvynq5fjypj"
|
||||||
|
|
|
||||||
|
|
@ -21,4 +21,5 @@ production = Array[ExtResource("1_81xhi")]([ExtResource("2_x1puw"), ExtResource(
|
||||||
description = "For some reason I always think of masonry when I read this word."
|
description = "For some reason I always think of masonry when I read this word."
|
||||||
color = Color(0.36862746, 0.3019608, 0.7529412, 1)
|
color = Color(0.36862746, 0.3019608, 0.7529412, 1)
|
||||||
wants = Array[ExtResource("1_81xhi")]([SubResource("Resource_3og8x")])
|
wants = Array[ExtResource("1_81xhi")]([SubResource("Resource_3og8x")])
|
||||||
|
soldier = true
|
||||||
metadata/_custom_type_script = "uid://hcvynq5fjypj"
|
metadata/_custom_type_script = "uid://hcvynq5fjypj"
|
||||||
|
|
|
||||||
|
|
@ -69,4 +69,5 @@ production = Array[ExtResource("1_05kyk")]([ExtResource("2_ud150"), ExtResource(
|
||||||
description = "FIREBALL!!!"
|
description = "FIREBALL!!!"
|
||||||
color = Color(0, 0, 0.79607844, 1)
|
color = Color(0, 0, 0.79607844, 1)
|
||||||
wants = Array[ExtResource("1_05kyk")]([SubResource("Resource_60ga3"), SubResource("Resource_i5jpd"), SubResource("Resource_2l2nr"), SubResource("Resource_6v7ae"), SubResource("Resource_iph2q"), SubResource("Resource_i8tft"), SubResource("Resource_j0xkl")])
|
wants = Array[ExtResource("1_05kyk")]([SubResource("Resource_60ga3"), SubResource("Resource_i5jpd"), SubResource("Resource_2l2nr"), SubResource("Resource_6v7ae"), SubResource("Resource_iph2q"), SubResource("Resource_i8tft"), SubResource("Resource_j0xkl")])
|
||||||
|
soldier = true
|
||||||
metadata/_custom_type_script = "uid://hcvynq5fjypj"
|
metadata/_custom_type_script = "uid://hcvynq5fjypj"
|
||||||
|
|
|
||||||
4
map.tscn
4
map.tscn
|
|
@ -7,7 +7,6 @@
|
||||||
[ext_resource type="Resource" uid="uid://dlxnbyiurne1s" path="res://currency/sentient/calvary.tres" id="4_iw27f"]
|
[ext_resource type="Resource" uid="uid://dlxnbyiurne1s" path="res://currency/sentient/calvary.tres" id="4_iw27f"]
|
||||||
[ext_resource type="Resource" uid="uid://b7lxfjhx4qhts" path="res://allegiance/good.tres" id="5_71pa8"]
|
[ext_resource type="Resource" uid="uid://b7lxfjhx4qhts" path="res://allegiance/good.tres" id="5_71pa8"]
|
||||||
[ext_resource type="Resource" uid="uid://dn0c1pfq04obw" path="res://currency/sentient/farmer.tres" id="6_05x41"]
|
[ext_resource type="Resource" uid="uid://dn0c1pfq04obw" path="res://currency/sentient/farmer.tres" id="6_05x41"]
|
||||||
[ext_resource type="Resource" uid="uid://l8osuuxl7exe" path="res://currency/sentient/archer.tres" id="8_oysan"]
|
|
||||||
[ext_resource type="Resource" uid="uid://clx8tbrad4m7c" path="res://currency/sentient/dinosaur.tres" id="9_sb2pt"]
|
[ext_resource type="Resource" uid="uid://clx8tbrad4m7c" path="res://currency/sentient/dinosaur.tres" id="9_sb2pt"]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_bhunq"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_bhunq"]
|
||||||
|
|
@ -180,6 +179,7 @@ allegiance = ExtResource("5_71pa8")
|
||||||
position = Vector2(905, 42)
|
position = Vector2(905, 42)
|
||||||
|
|
||||||
[node name="MemberSprite" parent="CharacterBody2D3" index="1" unique_id=283117283]
|
[node name="MemberSprite" parent="CharacterBody2D3" index="1" unique_id=283117283]
|
||||||
|
currency = ExtResource("9_sb2pt")
|
||||||
allegiance = ExtResource("5_71pa8")
|
allegiance = ExtResource("5_71pa8")
|
||||||
|
|
||||||
[node name="CharacterBody2D4" parent="." unique_id=327546409 instance=ExtResource("3_e0an3")]
|
[node name="CharacterBody2D4" parent="." unique_id=327546409 instance=ExtResource("3_e0an3")]
|
||||||
|
|
@ -245,7 +245,7 @@ currency = ExtResource("6_05x41")
|
||||||
position = Vector2(853, -17.999998)
|
position = Vector2(853, -17.999998)
|
||||||
|
|
||||||
[node name="MemberSprite" parent="CharacterBody2D12" index="1" unique_id=283117283]
|
[node name="MemberSprite" parent="CharacterBody2D12" index="1" unique_id=283117283]
|
||||||
currency = ExtResource("8_oysan")
|
currency = ExtResource("9_sb2pt")
|
||||||
|
|
||||||
[node name="CharacterBody2D13" parent="." unique_id=799583982 instance=ExtResource("3_e0an3")]
|
[node name="CharacterBody2D13" parent="." unique_id=799583982 instance=ExtResource("3_e0an3")]
|
||||||
position = Vector2(905.99994, -11.999985)
|
position = Vector2(905.99994, -11.999985)
|
||||||
|
|
|
||||||
12
troup.gd
12
troup.gd
|
|
@ -21,8 +21,18 @@ func removed_target():
|
||||||
target = null
|
target = null
|
||||||
|
|
||||||
func combat(target):
|
func combat(target):
|
||||||
|
if get_node("MemberSprite").get_combat() == false:
|
||||||
|
var p := Production.new()
|
||||||
|
p.amount = -1
|
||||||
|
p.currency = %MemberSprite.currency
|
||||||
|
Economy.produce(p)
|
||||||
|
self.queue_free()
|
||||||
|
return
|
||||||
var winner = randf_range(0,2)
|
var winner = randf_range(0,2)
|
||||||
print(winner)
|
if %MemberSprite.currency.name == "Dinosaur" or %MemberSprite.currency.name == "Wizard":
|
||||||
|
winner -= 0.5
|
||||||
|
if target.get_node("MemberSprite").currency.name == "Dinosaur" or target.get_node("MemberSprite").currency.name == "Wizard":
|
||||||
|
winner += 0.5
|
||||||
if winner <= 1:
|
if winner <= 1:
|
||||||
target.queue_free()
|
target.queue_free()
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue