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,20 @@
using Godot;
using System;
using System.Collections.Generic;
using System.Linq;
public partial class ClickEffect1 : ClickEffect
{
public override void Fire()
{
base.Fire();
if (_available && (_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(-50,-30);
shields[shieldNumber].ChangeHealth(damage);
_contact._button._phone._player._debug.Text = "Shield "+shieldNumber+" damaged for "+damage+" Damage!";
}
}
}

View File

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

View File

@@ -0,0 +1,9 @@
[gd_scene format=3 uid="uid://dkio7bpdjyh6q"]
[ext_resource type="PackedScene" uid="uid://fygidhjkgabe" path="res://Gameplay/effect.tscn" id="1_dgxlt"]
[ext_resource type="Script" uid="uid://qmmft72g5uj6" path="res://Gameplay/Effects/ClickEffects/ClickEffect1.cs" id="2_wfqii"]
[node name="ClickEffect1" unique_id=110922950 instance=ExtResource("1_dgxlt")]
script = ExtResource("2_wfqii")
[node name="Timer" type="Timer" parent="." index="0" unique_id=801745901]