Craftelia 4711ae0230 design/afterGala3BalancePatch (#22)
- Massive rebalance of all units and levels (game is more focused on early base building and late powerful waves)
- Added all desert levels
- Added spearman, archer lvl3, gatherers lvl2 and lvl3, temp art skittering husk
- Added stone house (more pop)
- Tooltip visual rework
- Some bugs fixed
- Playing sounds when placing units

Reviewed-on: http://gitea.clubconjure.com/Conjure/gather-and-defend/pulls/22
Reviewed-by: Ader_Alisma <ader.alisma.1@ens.etsmtl.ca>
Co-authored-by: Craftelia <william-gin1@hotmail.com>
Co-committed-by: Craftelia <william-gin1@hotmail.com>
2026-01-24 15:50:46 +00:00

67 lines
1.7 KiB
C#

using GatherAndDefend;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Ally : Entity
{
public override float DamageMultiplier => GlobalConfig.Instance.Current.allyDamageMultiplier;
public override float AttackSpeedMultiplier => GlobalConfig.Instance.Current.allyAttackSpeedMultiplier;
public override float HpMultiplier => GlobalConfig.Instance.Current.allyLifeMultiplier;
public override Vector2 RangeMultiplier => GlobalConfig.Instance.Current.allyRangeMultiplier;
public override float SpeedMultiplier => GlobalConfig.Instance.Current.allySpeedMultiplier;
public float PopulationCost => GlobalConfig.Instance.Current.populationCostPerUnit;
public AudioTemplate SoundPlayerWhenPlaced;
public override void Start()
{
base.Start();
if (SoundPlayerWhenPlaced != null)
{
PlaySound(SoundPlayerWhenPlaced);
}
}
public override void Update()
{
base.Update();
if (IsEnemyDetected)
{
AttackEnemy();
}
}
void AttackEnemy()
{
//Attack Cooldown
if (AttackSpeedWait > AttackInterval)
{
Animation.PlayAttackAnim();
AttackSpeedWait = 0f;
}
AttackSpeedWait += Time.deltaTime;
}
public Vector3 GetPosition()
{
return transform.position;
}
public override void LevelStart()
{
base.LevelStart();
if (this is not Building) ResourceManager.Instance.CurrentPopulation += PopulationCost;
}
public override void LevelDestroy()
{
base.LevelDestroy();
if (this is not Building) ResourceManager.Instance.CurrentPopulation -= PopulationCost;
}
}