way too many changes to list, oops. big rewrite.

This commit is contained in:
2025-05-27 03:38:03 +10:00
parent 16951a9beb
commit 4a21701a35
663 changed files with 7389 additions and 3283 deletions
Assets
Audio
Cards
Classes
Mods/Base
PCs
Projectiles
Resources
Scenes
8_direction_sprite.tscn
CardPrinter
Menus
Projectiles
ShopStand
Shredder
TowerBase
Towers
UI
Weapons
corpse.tscndamage_particle.tscnenemy_spawner.tscngauntlet.tscnhealth_bar.tscnitem_card.tscnitem_container.tscnpath_visual_thing.tscnvisual_path.tscn
Scripts
Affectors
EnemyAI
Projectiles
Resources
StatusEffects
Towers
Weapons
a_star_graph_3d.gda_star_graph_3d.gd.uidalert_popup.gd.uidaudio_options.gd.uidcard_hand.gd.uidchatbox.gd.uidcinema_cam.gd.uidconfirmation_popup.gd.uidcorpse.gdcorpse.gd.uiddamage_particle.gd.uiddata.gddata.gd.uidedit_tool.gd.uideffect.gdeffect.gd.uideight_direction_sprite.gd.uidenemy_card.gdenemy_card.gd.uidenemy_goal.gd.uidenemy_spawner.gdenemy_spawner.gd.uidfloat_and_spin.gd.uidgame.gdgame.gd.uidgame_mode.gdgame_mode.gd.uidgameplay_options.gd.uidgraphics_options.gd.uidhealth.gdhealth.gd.uidhealth_bar.gd.uidhitbox.gdhitbox.gd.uidinteract_button.gdinteract_button.gd.uidinventory.gd.uiditem_card.gd.uiditem_container.gd.uidkey_icon_map.gd.uidkeybind_options.gd.uidkillbox.gd.uidlevel.gdlevel.gd.uidlifebar_segment.gd.uidlives_bar.gd.uidloadout_editor.gdlobby.gdlobby.gd.uidminimap_cam.gd.uidmultiplayer_lobby.gdmultiplayer_lobby.gd.uidon_top_camera.gd.uidoptions_menu.gd.uidpath_visual_thing.gd.uidpickup_notification.gd.uidround_stats.gd.uidscoreboard.gd.uidscoreboard_entry.gd.uidserver_form.gdserver_form.gd.uidsingleplayer_lobby.gdsingleplayer_lobby.gd.uidsprite_bobber.gd.uidstatus_effector.gd.uidtarget_dummy.gd.uidtarget_finder.gdtarget_finder.gd.uidtext_input_popup.gd.uidtower_base.gd.uidvisualized_path.gdvisualized_path.gd.uidwave.gdwave.gd.uidwave_manager.gdwave_manager.gd.uid
Towers
Ascension
Assault
Blowdart
BombLauncher
Fireball
Flamethrower
Gatling
GlueLauncher
Icicle
Overclock
Reactor
Refrigerator
RocketLauncher
Sniper
tower.gdtower.gd.uid
UI
Weapons
Ascension
Assault
Blowdart
BombLauncher
Fireball
Flamethrower
Gatling
GlueLauncher
Icicle
Overclock
Reactor
Refrigerator
RocketLauncher
Sniper
Worlds
achievement_popup.gdachievement_popup.gd.uidachievement_popup.tscnbridge.blendbridge.glbbridge.glb.importcard_item.gdcard_item.gd.uidenemy_card_ui.gdenemy_card_ui.gd.uidenemy_card_ui.tscnenergy_bar.gdenergy_bar.gd.uidenergy_bar.tscnexport_presets.cfgjoytest.gdjoytest.tscnladder.gdladder.gd.uidladder.tscnmat1.tresmat13.tresmat2.tresmod_menu.gdmod_menu.gd.uidmouse_hover_material.tresnew_standard_material_3d.tresnew_style_box_flat.tresnew_theme.tresplan.glbplan.glb.importplan.tscnplan_mat.tresplan_plan_tex.pngplan_plan_tex.png.importproject.godotshot1.wavvisualized_path.tscnworld_test.tscn

@ -24,10 +24,14 @@ func close() -> void:
func randomize_cards() -> void:
#TODO: use seeded randomness
var random_faction: int = randi_range(1, Card.Faction.values().size() - 1)
var cheap_cards: Array[Card] = []
var medium_cards: Array[Card] = []
var pricey_cards: Array[Card] = []
for card: Card in Data.cards:
if card.faction != random_faction:
continue
if card.rarity == Data.Rarity.UNCOMMON or card.rarity == Data.Rarity.RARE:
cheap_cards.append(card)
if card.rarity == Data.Rarity.RARE or card.rarity == Data.Rarity.EPIC:
@ -35,27 +39,46 @@ func randomize_cards() -> void:
if card.rarity == Data.Rarity.EPIC or card.rarity == Data.Rarity.LEGENDARY:
pricey_cards.append(card)
var chosen_card: Card = null
for x: int in 3:
var chosen_card: Card = cheap_cards[Game.randi_in_range(12 * cards_generated, 0, cheap_cards.size() - 1)]
if cheap_cards.size() > 0:
chosen_card = cheap_cards[Game.randi_in_range(12 * cards_generated, 0, cheap_cards.size() - 1)]
cards_generated += 1
cards[x].set_card(chosen_card)
cards[x].view_tower()
choice_buttons[x].press_cost = price_dict[chosen_card.rarity]
choice_buttons[x].hover_text = "Spend $" + str(choice_buttons[x].press_cost) + " to acquire " + chosen_card.display_name + "?"
if chosen_card != null:
cards[x].set_card(chosen_card)
cards[x].view_tower()
choice_buttons[x].press_cost = price_dict[chosen_card.rarity]
choice_buttons[x].hover_text = "Spend $" + str(choice_buttons[x].press_cost) + " to acquire " + chosen_card.display_name + "?"
if chosen_card.faction == Card.Faction.MAGE:
Data.save_data.saw_mage_card_in_shop()
for x: int in 2:
var chosen_card: Card = medium_cards[Game.randi_in_range(9 * cards_generated, 0, medium_cards.size() - 1)]
if medium_cards.size() > 0:
chosen_card = medium_cards[Game.randi_in_range(9 * cards_generated, 0, medium_cards.size() - 1)]
elif cheap_cards.size() > 0:
chosen_card = cheap_cards[Game.randi_in_range(9 * cards_generated, 0, cheap_cards.size() - 1)]
cards_generated += 1
cards[x+3].set_card(chosen_card)
cards[x+3].view_tower()
choice_buttons[x+3].press_cost = price_dict[chosen_card.rarity]
choice_buttons[x+3].hover_text = "Spend $" + str(choice_buttons[x+3].press_cost) + " to acquire " + chosen_card.display_name + "?"
if chosen_card != null:
cards[x+3].set_card(chosen_card)
cards[x+3].view_tower()
choice_buttons[x+3].press_cost = price_dict[chosen_card.rarity]
choice_buttons[x+3].hover_text = "Spend $" + str(choice_buttons[x+3].press_cost) + " to acquire " + chosen_card.display_name + "?"
if chosen_card.faction == Card.Faction.MAGE:
Data.save_data.saw_mage_card_in_shop()
for x: int in 1:
var chosen_card: Card = pricey_cards[Game.randi_in_range(50 * cards_generated, 0, pricey_cards.size() - 1)]
if pricey_cards.size() > 0:
chosen_card = pricey_cards[Game.randi_in_range(50 * cards_generated, 0, pricey_cards.size() - 1)]
elif medium_cards.size() > 0:
chosen_card = medium_cards[Game.randi_in_range(50 * cards_generated, 0, medium_cards.size() - 1)]
elif cheap_cards.size() > 0:
chosen_card = cheap_cards[Game.randi_in_range(50 * cards_generated, 0, cheap_cards.size() - 1)]
cards_generated += 1
cards[x+5].set_card(chosen_card)
cards[x+5].view_tower()
choice_buttons[x+5].press_cost = price_dict[chosen_card.rarity]
choice_buttons[x+5].hover_text = "Spend $" + str(choice_buttons[x+5].press_cost) + " to acquire " + chosen_card.display_name + "?"
if chosen_card != null:
cards[x+5].set_card(chosen_card)
cards[x+5].view_tower()
choice_buttons[x+5].press_cost = price_dict[chosen_card.rarity]
choice_buttons[x+5].hover_text = "Spend $" + str(choice_buttons[x+5].press_cost) + " to acquire " + chosen_card.display_name + "?"
if chosen_card.faction == Card.Faction.MAGE:
Data.save_data.saw_mage_card_in_shop()
for x: CollisionShape3D in choice_colliders:
x.set_deferred("disabled", false)
for x: Sprite3D in choice_sprites:
@ -67,6 +90,10 @@ func retrieve_card(i: int, callback: Hero) -> void:
choice_colliders[i].disabled = true
choice_sprites[i].set_visible(false)
var card: Card = cards[i].stats
if card.faction == Card.Faction.ENGINEER:
Data.save_data.bought_engineer_card()
if card.faction == Card.Faction.MAGE:
Data.save_data.bought_mage_card()
callback.add_card(card)
#var item: ItemCard = item_card_scene.instantiate() as ItemCard
#item.card = card