reworking effects, turning them into their own scene for replicability

This commit is contained in:
2026-02-03 03:37:58 -05:00
parent 36b934b200
commit 435fbc7ba2
32 changed files with 321 additions and 172 deletions

View File

@@ -0,0 +1,21 @@
using Godot;
using System;
using System.Collections.Generic;
using System.Linq;
public partial class TimeEffect1 : TimeEffect
{
public override void Fire()
{
base.Fire();
if (_calls <= _maxCalls || _maxCalls == 0)
{
List<Shield> shields = _contact._button._phone._player._board._shields.Where(s=>!s._broken).ToList();
int shieldNumber = Globals._rng.Next(0, shields.Count);
int damage = Globals._rng.Next(-12,-8);
shields[shieldNumber].ChangeHealth(damage);
_contact._button._phone._player._debug.Text = "Shield "+shieldNumber+" damaged for "+damage+" Damage!";
}
}
}

View File

@@ -0,0 +1 @@
uid://b3ql333letuv

View File

@@ -0,0 +1,10 @@
[gd_scene format=3 uid="uid://dxr716rnqu2e"]
[ext_resource type="Script" uid="uid://b3ql333letuv" path="res://Gameplay/Effects/TimeEffects/TimeEffect1.cs" id="1_l6ud1"]
[node name="TimeEffect1" type="Node" unique_id=980963154]
script = ExtResource("1_l6ud1")
[node name="Timer" type="Timer" parent="." unique_id=1364707554]
[connection signal="timeout" from="Timer" to="." method="OnTimerTimeout"]