Compare commits
6 Commits
v0.4.0-rel
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 1e730e8321 | |||
| eb177adffe | |||
| b7ed9461a3 | |||
| 11b1745c9d | |||
| 89d1f5b4b7 | |||
| 387c91e752 |
@@ -100,4 +100,9 @@ script = ExtResource("5_f7xim")
|
||||
critical_zone = true
|
||||
metadata/_custom_type_script = "uid://cummt2be3r1gq"
|
||||
|
||||
[connection signal="recieved_effect" from="Hitbox" to="StatusEffector" method="add_effect"]
|
||||
[connection signal="took_damage" from="Hitbox" to="." method="take_damage"]
|
||||
[connection signal="recieved_effect" from="Hitbox2" to="StatusEffector" method="add_effect"]
|
||||
[connection signal="took_damage" from="Hitbox2" to="." method="take_damage"]
|
||||
|
||||
[editable path="mdl_skitter"]
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
[gd_resource type="Resource" script_class="WaveConfig" format=3 uid="uid://bkcmdtfrhq43v"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://3grc2j4bjrnw" path="res://enemy_group.gd" id="1_bojkk"]
|
||||
[ext_resource type="Resource" uid="uid://cvehqh4tt28g7" path="res://Enemies/BabyEyeDog/baby_eye_dog.tres" id="2_a2eo6"]
|
||||
[ext_resource type="Script" uid="uid://bp6q371iypd06" path="res://Scripts/wave_config.gd" id="2_ptt5n"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_crjd6"]
|
||||
script = ExtResource("1_bojkk")
|
||||
enemy = ExtResource("2_a2eo6")
|
||||
count = 40
|
||||
metadata/_custom_type_script = "uid://3grc2j4bjrnw"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_llpiq"]
|
||||
script = ExtResource("1_bojkk")
|
||||
enemy = ExtResource("2_a2eo6")
|
||||
count = 20
|
||||
metadata/_custom_type_script = "uid://3grc2j4bjrnw"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_ptt5n")
|
||||
enemy_groups = Dictionary[ExtResource("1_bojkk"), int]({
|
||||
SubResource("Resource_crjd6"): 0,
|
||||
SubResource("Resource_llpiq"): 0
|
||||
})
|
||||
metadata/_custom_type_script = "uid://bp6q371iypd06"
|
||||
@@ -3,6 +3,7 @@ extends HeroState
|
||||
|
||||
|
||||
func enter_state() -> void:
|
||||
hero.hud.unset_hover_text()
|
||||
hero.hud.set_currencies_visible(false)
|
||||
hero.left_hand_model.visible = false
|
||||
if hero.weapons[hero.equipped_weapon]:
|
||||
|
||||
@@ -120,7 +120,7 @@ func process_looking_at_tower() -> void:
|
||||
point = ray_collider.point
|
||||
if last_point != point:
|
||||
clear_previous_point()
|
||||
|
||||
last_point = null
|
||||
wall_preview.set_visible(false)
|
||||
ray_collider.set_color(Color.RED)
|
||||
ray_collider.set_float(0.0)
|
||||
|
||||
@@ -13,14 +13,6 @@ func _ready() -> void:
|
||||
button.hover_text = tr("PROMPT_RADIO_INTERACT")
|
||||
|
||||
|
||||
func get_faction_cards(faction: Card.Faction) -> Array[Card]:
|
||||
var valid_cards: Array[Card] = []
|
||||
for card: Card in Data.cards:
|
||||
if card.faction == faction:
|
||||
valid_cards.append(card)
|
||||
return valid_cards
|
||||
|
||||
|
||||
func generate_rarity() -> int:
|
||||
var weight_total: int = 0
|
||||
for rarity: String in Data.Rarity:
|
||||
@@ -43,7 +35,7 @@ func randomize_cards(faction: Card.Faction) -> void:
|
||||
var pos_x: float = 0.0
|
||||
for x: int in cards_to_spawn:
|
||||
var decided_rarity: int = generate_rarity()
|
||||
var card_choices: Array[Card] = get_faction_cards(faction)
|
||||
var card_choices: Array[Card] = Card.get_faction_cards(faction)
|
||||
var card_array: Array = []
|
||||
var cards_chosen: bool = false
|
||||
while !cards_chosen:
|
||||
@@ -76,7 +68,7 @@ func find_cards(faction: Card.Faction, rarity: Data.Rarity, allowed_cards: Array
|
||||
decided_rarity = generate_rarity()
|
||||
var card_choices: Array[Card] = allowed_cards
|
||||
if !card_choices:
|
||||
card_choices = get_faction_cards(faction)
|
||||
card_choices = Card.get_faction_cards(faction)
|
||||
var cards: Array[Card] = []
|
||||
var valid_cards_found: bool = false
|
||||
var testing_rarity: int = decided_rarity
|
||||
|
||||
@@ -7,6 +7,13 @@ enum Faction {
|
||||
MAGE = 2,
|
||||
}
|
||||
|
||||
static func get_faction_cards(faction: Card.Faction) -> Array[Card]:
|
||||
var valid_cards: Array[Card] = []
|
||||
for card: Card in Data.cards:
|
||||
if card.faction == faction:
|
||||
valid_cards.append(card)
|
||||
return valid_cards
|
||||
|
||||
@export var cost: int
|
||||
@export var rarity: Data.Rarity
|
||||
@export var faction: Faction
|
||||
|
||||
@@ -157,7 +157,7 @@ func level_selected(level: LevelConfig, side: int) -> void:
|
||||
gamemode.rng_seed = generate_seed() if gamemode.endless else level.game_seed
|
||||
gamemode.daily = false
|
||||
if gamemode.endless:
|
||||
level.allowed_cards = level.hero_class.deck
|
||||
level.allowed_cards = Card.get_faction_cards(level.hero_class.faction)
|
||||
level.waves = []
|
||||
game.level_config = level
|
||||
if !gamemode.multiplayer:
|
||||
|
||||
@@ -11,9 +11,10 @@ signal closed()
|
||||
|
||||
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("Pause"):
|
||||
if event.is_action_pressed("Pause") or event.is_action_pressed("Show Wave Preview"):
|
||||
queue_free()
|
||||
closed.emit()
|
||||
get_viewport().set_input_as_handled()
|
||||
|
||||
|
||||
func set_waves(waves: Array[WaveConfig], starting_wave_number: int) -> void:
|
||||
|
||||
Reference in New Issue
Block a user