made an action be owned by a contact instead of actor; made another example action
This commit is contained in:
@@ -16,10 +16,10 @@ public partial class Example1 : Action
|
||||
{
|
||||
base.Fire();
|
||||
// GD.Print(_owner);
|
||||
List<Shield> unbrokenShields = [.. _owner._board._shields.Where(s=>!s._broken)];
|
||||
List<Shield> unbrokenShields = [.. _contact._owner._board._shields.Where(s=>!s._broken)];
|
||||
int shieldNumber = Globals._rng.Next(0, unbrokenShields.Count);
|
||||
int damageAmount = Globals._rng.Next(-12,-8);
|
||||
_owner._board._shields[shieldNumber].ChangeHealth(damageAmount);
|
||||
((Player)_owner)._phone._debug.Text = "Shield " + shieldNumber + " damaged " + damageAmount + "hp";
|
||||
_contact._owner._board._shields[shieldNumber].ChangeHealth(damageAmount);
|
||||
((Player)_contact._owner)._phone._debug.Text = "Shield " + shieldNumber + " damaged " + damageAmount + "hp";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user