starting a major rework, where all effects are controlled within a contact

This commit is contained in:
2026-02-06 02:13:01 -05:00
parent 435fbc7ba2
commit 043eb19b5a
41 changed files with 128 additions and 805 deletions

View File

@@ -12,7 +12,6 @@ public partial class Player : Actor
public Boss _boss;
public Enemy _activeEnemy;
public RichTextLabel _debug, _busDebug;
public List<BusinessCard> _businessCards;
public override void _Ready()
{
@@ -26,23 +25,6 @@ public partial class Player : Actor
_boss = GetNode<Boss>("Boss");
_boss.PassPlayer(this);
_businessCards = GetChildren().Where(c=>c is BusinessCard).Cast<BusinessCard>().ToList();
for (int i = 0; i < _businessCards.Count; i++)
{
_businessCards[i].PassPlayer(this);
if (_businessCards[i].Name.ToString().IndexOf("Default") > -1)
{
string goalNameString = _businessCards[i].Name.ToString().Replace("Default","").Replace("Alt","");
GoalName goalName;
Enum.TryParse(goalNameString, out goalName);
_businessCards[i].AssignGoal(goalName);
}
else
{
_businessCards[i].AssignRandomGoal();
}
}
Challenge(_boss);
}
@@ -53,7 +35,6 @@ public partial class Player : Actor
ENEMY._board.Activate();
_board = ENEMY._board;
_activeEnemy = ENEMY;
CheckGoals();
string text = "";
if (_activeEnemy is Mook)
@@ -67,11 +48,6 @@ public partial class Player : Actor
_debug.Text = text;
}
public void CheckGoals()
{
_businessCards.ForEach(b=>b.CheckGoal());
}
public void RunLost()
{
_debug.Text = "YOU LOSE!!";
@@ -84,10 +60,7 @@ public partial class Player : Actor
public void StartBattle()
{
for (int i = 0; i < _phone._phoneButtons.Count; i++)
{
_phone.Start();
}
_phone.Begin();
}
// public bool CheckWin(List<Shield> SHIELDS)