Implement statuses, GolemCharge, GolemBerserk, stun
This commit is contained in:
parent
caf782c884
commit
ef9ec43c8a
16 changed files with 260 additions and 38 deletions
30
Assets/Battle/Effects/StatusEffect.cs
Normal file
30
Assets/Battle/Effects/StatusEffect.cs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class StatusEffect : IBattleEffect
|
||||
{
|
||||
private BattleParticipant target;
|
||||
private BattleStatus status;
|
||||
private int amount;
|
||||
|
||||
public StatusEffect(BattleParticipant target, BattleStatus status) {
|
||||
this.target = target;
|
||||
this.status = status;
|
||||
this.amount = 1;
|
||||
}
|
||||
|
||||
public StatusEffect(BattleParticipant target, BattleStatus status, int amount) {
|
||||
this.target = target;
|
||||
this.status = status;
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public void Apply(IBattleEffectResolver resolver) {
|
||||
resolver.AddStatus(this);
|
||||
}
|
||||
|
||||
public BattleParticipant Target {get => this.target;}
|
||||
public BattleStatus Status {get => this.status;}
|
||||
public int Amount {get => this.amount;}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue