11:32am7-10-25 11:32am7-10-25 11:32am7-10-25 11:32am7-10-25 11:32am7-10-25 11:32am
70 lines
1.4 KiB
C#
70 lines
1.4 KiB
C#
using Godot;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
public partial class Shark : Node2D
|
|
{
|
|
|
|
public bool _dead;
|
|
public int _aptitude, _agility, _ardor, _accuity, _awareness, _appeal, _health, _healthMax, _energy, _energyMax, _stamina, _staminaMax, _burden, _turnBandwidth, _turnBandwidthMax, _battleBandwidth, _criticalChance;
|
|
public string _name;
|
|
public SharkHud _hud;
|
|
public List<Ball> _balls = new();
|
|
|
|
public override void _Ready()
|
|
{
|
|
_name = "Sample Cog";
|
|
_dead = false;
|
|
|
|
_aptitude = 10; // ball launch speed / strength
|
|
_agility = 10; // ball launch stamina
|
|
_ardor = 10; // ball defense
|
|
_accuity = 10; // ball
|
|
_awareness = 10;
|
|
_appeal = 10;
|
|
|
|
_health = _ardor * 12;
|
|
_healthMax = _health;
|
|
_energy = _accuity * 12;
|
|
_energyMax = _energy;
|
|
_stamina = _agility * 12;
|
|
_staminaMax = _stamina;
|
|
_burden = _appeal / 12;
|
|
_turnBandwidth = (int)(_awareness * 2 / 3);
|
|
_turnBandwidthMax = _turnBandwidth;
|
|
_battleBandwidth = _turnBandwidthMax * 4;
|
|
|
|
_criticalChance = 10;
|
|
}
|
|
|
|
public void Attack(Ball target)
|
|
{
|
|
Ball ball = GetNode<Ball>("Ball");
|
|
if (ball._launched)
|
|
{
|
|
target.DefenseChange(-3);
|
|
}
|
|
}
|
|
|
|
public void HealthChange(int change)
|
|
{
|
|
_health += change;
|
|
if (_health < 0)
|
|
{
|
|
_dead = true;
|
|
}
|
|
}
|
|
|
|
public void HoldBall()
|
|
{
|
|
Ball ball = GetNode<Ball>("Ball");
|
|
ball._holding = true;
|
|
}
|
|
|
|
public void PlaceBall(Vector2 position)
|
|
{
|
|
Ball ball = GetNode<Ball>("Ball");
|
|
ball.Start(position);
|
|
}
|
|
}
|