Implement OilOfSharpness
This commit is contained in:
parent
2190070fee
commit
31cb8fe4c0
45 changed files with 604 additions and 21 deletions
27
Assets/Battle/Effects/BuffParticipantEffect.cs
Normal file
27
Assets/Battle/Effects/BuffParticipantEffect.cs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class BuffParticipantEffect : IBattleEffect
|
||||
{
|
||||
private BattleParticipant mParticipant;
|
||||
private BuffType mType;
|
||||
private BuffDuration mDuration;
|
||||
private int mAmount;
|
||||
|
||||
public BuffParticipantEffect(BattleParticipant participant, BuffType type, int amount, BuffDuration duration) {
|
||||
mParticipant = participant;
|
||||
mType = type;
|
||||
mAmount = amount;
|
||||
mDuration = duration;
|
||||
}
|
||||
|
||||
public void Apply(IBattleEffectResolver resolver) {
|
||||
resolver.BuffParticipant(this);
|
||||
}
|
||||
|
||||
public BattleParticipant Participant {get => mParticipant;}
|
||||
public BuffType Type {get => mType;}
|
||||
public BuffDuration Duration {get => mDuration;}
|
||||
public int Amount {get => mAmount;}
|
||||
}
|
||||
11
Assets/Battle/Effects/BuffParticipantEffect.cs.meta
Normal file
11
Assets/Battle/Effects/BuffParticipantEffect.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 203a8da7e3f13cf478d850b47c3f762e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -4,11 +4,13 @@ using UnityEngine;
|
|||
|
||||
public class DealDamageEffect : IBattleEffect
|
||||
{
|
||||
private BattleParticipant source;
|
||||
private BattleParticipant target;
|
||||
private int amount;
|
||||
private int amountDealt;
|
||||
|
||||
public DealDamageEffect(BattleParticipant target, int amount) {
|
||||
public DealDamageEffect(BattleParticipant source, BattleParticipant target, int amount) {
|
||||
this.source = source;
|
||||
this.target = target;
|
||||
this.amount = amount;
|
||||
}
|
||||
|
|
@ -17,6 +19,7 @@ public class DealDamageEffect : IBattleEffect
|
|||
this.amountDealt = resolver.DealDamage(this);
|
||||
}
|
||||
|
||||
public BattleParticipant Source {get => this.source;}
|
||||
public BattleParticipant Target {get => this.target;}
|
||||
public int Amount {get => this.amount;}
|
||||
public int AmountDealt {get => this.amountDealt;}
|
||||
|
|
|
|||
19
Assets/Battle/Effects/DefaultEffect.cs
Normal file
19
Assets/Battle/Effects/DefaultEffect.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
public class DefaultEffect : IBattleEffect
|
||||
{
|
||||
private DefaultHeroCard mCard;
|
||||
|
||||
public DefaultEffect(DefaultHeroCard card) {
|
||||
mCard = card;
|
||||
}
|
||||
|
||||
public void Apply(IBattleEffectResolver resolver) {
|
||||
resolver.SetupDefault(this);
|
||||
}
|
||||
|
||||
public DefaultHeroCard Card {get => mCard;}
|
||||
}
|
||||
11
Assets/Battle/Effects/DefaultEffect.cs.meta
Normal file
11
Assets/Battle/Effects/DefaultEffect.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c713bb4a53fb33249a23147f4f67114c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
Add table
Add a link
Reference in a new issue