Implement Triggers and Scarring
This commit is contained in:
parent
cbc8c8b6cd
commit
265c24ea1c
18 changed files with 247 additions and 5 deletions
16
Assets/Battle/Effects/ArmDamageTriggerEffect.cs
Normal file
16
Assets/Battle/Effects/ArmDamageTriggerEffect.cs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class ArmDamageTriggerEffect : IBattleEffect
|
||||
{
|
||||
private DamageTrigger damageTrigger;
|
||||
|
||||
public ArmDamageTriggerEffect(DamageTrigger damageTrigger) {
|
||||
this.damageTrigger = damageTrigger;
|
||||
}
|
||||
|
||||
public void Apply(IBattleEffectResolver resolver) {
|
||||
resolver.ArmDamageTrigger(this.damageTrigger);
|
||||
}
|
||||
}
|
||||
11
Assets/Battle/Effects/ArmDamageTriggerEffect.cs.meta
Normal file
11
Assets/Battle/Effects/ArmDamageTriggerEffect.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f7658a09c682e8545a141aa3ac050649
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -13,6 +13,9 @@ public class DealDamageEffect : IBattleEffect
|
|||
}
|
||||
|
||||
public void Apply(IBattleEffectResolver resolver) {
|
||||
resolver.DealDamage(this.target, this.amount);
|
||||
resolver.DealDamage(this);
|
||||
}
|
||||
|
||||
public BattleParticipant Target {get => this.target;}
|
||||
public int Amount {get => this.amount;}
|
||||
}
|
||||
|
|
|
|||
21
Assets/Battle/Effects/IncreaseMaxHPEffect.cs
Normal file
21
Assets/Battle/Effects/IncreaseMaxHPEffect.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class IncreaseMaxHPEffect : IBattleEffect
|
||||
{
|
||||
private BattleParticipant target;
|
||||
private int amount;
|
||||
|
||||
public IncreaseMaxHPEffect(BattleParticipant target, int amount) {
|
||||
this.target = target;
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public void Apply(IBattleEffectResolver resolver) {
|
||||
resolver.IncreaseMaxHP(this);
|
||||
}
|
||||
|
||||
public BattleParticipant Target {get => this.target;}
|
||||
public int Amount {get => this.amount;}
|
||||
}
|
||||
11
Assets/Battle/Effects/IncreaseMaxHPEffect.cs.meta
Normal file
11
Assets/Battle/Effects/IncreaseMaxHPEffect.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e1dd7732e862a6e40b5221f85a09b56d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
Add table
Add a link
Reference in a new issue