init
This commit is contained in:
27
Assets/TcgEngine/Scripts/Effects/EffectAddAbility.cs
Normal file
27
Assets/TcgEngine/Scripts/Effects/EffectAddAbility.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Effect that adds an ability to a card
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/AddAbility", order = 10)]
|
||||
public class EffectAddAbility : EffectData
|
||||
{
|
||||
public AbilityData gain_ability;
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
target.AddAbility(gain_ability);
|
||||
}
|
||||
|
||||
public override void DoOngoingEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
target.AddOngoingAbility(gain_ability);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectAddAbility.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectAddAbility.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6d5f6cce89a500845aa64d3b6898542b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
63
Assets/TcgEngine/Scripts/Effects/EffectAddStat.cs
Normal file
63
Assets/TcgEngine/Scripts/Effects/EffectAddStat.cs
Normal file
@@ -0,0 +1,63 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Effect that adds or removes basic card/player stats such as hp, attack, mana
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/AddStat", order = 10)]
|
||||
public class EffectAddStat : EffectData
|
||||
{
|
||||
public EffectStatType type;
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Player target)
|
||||
{
|
||||
if (type == EffectStatType.HP)
|
||||
{
|
||||
target.hp += ability.value;
|
||||
target.hp_max += ability.value;
|
||||
}
|
||||
|
||||
if (type == EffectStatType.Mana)
|
||||
{
|
||||
target.mana += ability.value;
|
||||
target.mana_max += ability.value;
|
||||
target.mana = Mathf.Max(target.mana, 0);
|
||||
target.mana_max = Mathf.Clamp(target.mana_max, 0, GameplayData.Get().mana_max);
|
||||
}
|
||||
}
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
if (type == EffectStatType.Attack)
|
||||
target.attack += ability.value;
|
||||
if (type == EffectStatType.HP)
|
||||
target.hp += ability.value;
|
||||
if (type == EffectStatType.Mana)
|
||||
target.mana += ability.value;
|
||||
}
|
||||
|
||||
public override void DoOngoingEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
if (type == EffectStatType.Attack)
|
||||
target.attack_ongoing += ability.value;
|
||||
if (type == EffectStatType.HP)
|
||||
target.hp_ongoing += ability.value;
|
||||
if (type == EffectStatType.Mana)
|
||||
target.mana_ongoing += ability.value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public enum EffectStatType
|
||||
{
|
||||
None = 0,
|
||||
Attack = 10,
|
||||
HP = 20,
|
||||
Mana = 30,
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectAddStat.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectAddStat.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: afd4095159bc7a149bacde93e89240ae
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
115
Assets/TcgEngine/Scripts/Effects/EffectAddStatCount.cs
Normal file
115
Assets/TcgEngine/Scripts/Effects/EffectAddStatCount.cs
Normal file
@@ -0,0 +1,115 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Effect that sets stats equal to a dynamic calculated value from a pile (number of cards on board/hand/deck)
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/AddStatCount", order = 10)]
|
||||
public class EffectAddStatCount : EffectData
|
||||
{
|
||||
public EffectStatType type;
|
||||
public PileType pile;
|
||||
|
||||
[Header("Count Traits")]
|
||||
public CardType has_type;
|
||||
public TeamData has_team;
|
||||
public TraitData has_trait;
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Player target)
|
||||
{
|
||||
int val = GetCount(logic.GetGameData(), caster) * ability.value;
|
||||
if (type == EffectStatType.HP)
|
||||
{
|
||||
target.hp += val;
|
||||
target.hp_max += ability.value;
|
||||
}
|
||||
|
||||
if (type == EffectStatType.Mana)
|
||||
{
|
||||
target.mana += val;
|
||||
target.mana_max += val;
|
||||
target.mana = Mathf.Max(target.mana, 0);
|
||||
target.mana_max = Mathf.Clamp(target.mana_max, 0, GameplayData.Get().mana_max);
|
||||
}
|
||||
}
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
int val = GetCount(logic.GetGameData(), caster) * ability.value;
|
||||
if (type == EffectStatType.Attack)
|
||||
target.attack += val;
|
||||
if (type == EffectStatType.HP)
|
||||
target.hp += val;
|
||||
if (type == EffectStatType.Mana)
|
||||
target.mana += val;
|
||||
}
|
||||
|
||||
public override void DoOngoingEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
int val = GetCount(logic.GetGameData(), caster) * ability.value;
|
||||
if (type == EffectStatType.Attack)
|
||||
target.attack_ongoing += val;
|
||||
if (type == EffectStatType.HP)
|
||||
target.hp_ongoing += val;
|
||||
if (type == EffectStatType.Mana)
|
||||
target.mana_ongoing += val;
|
||||
}
|
||||
|
||||
private int GetCount(Game data, Card caster)
|
||||
{
|
||||
Player player = data.GetPlayer(caster.player_id);
|
||||
return CountPile(player, pile);
|
||||
}
|
||||
|
||||
private int CountPile(Player player, PileType pile)
|
||||
{
|
||||
List<Card> card_pile = null;
|
||||
|
||||
if (pile == PileType.Hand)
|
||||
card_pile = player.cards_hand;
|
||||
|
||||
if (pile == PileType.Board)
|
||||
card_pile = player.cards_board;
|
||||
|
||||
if (pile == PileType.Equipped)
|
||||
card_pile = player.cards_equip;
|
||||
|
||||
if (pile == PileType.Deck)
|
||||
card_pile = player.cards_deck;
|
||||
|
||||
if (pile == PileType.Discard)
|
||||
card_pile = player.cards_discard;
|
||||
|
||||
if (pile == PileType.Secret)
|
||||
card_pile = player.cards_secret;
|
||||
|
||||
if (pile == PileType.Temp)
|
||||
card_pile = player.cards_temp;
|
||||
|
||||
if (card_pile != null)
|
||||
{
|
||||
int count = 0;
|
||||
foreach (Card card in card_pile)
|
||||
{
|
||||
if (IsTrait(card))
|
||||
count++;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
private bool IsTrait(Card card)
|
||||
{
|
||||
bool is_type = card.CardData.type == has_type || has_type == CardType.None;
|
||||
bool is_team = card.CardData.team == has_team || has_team == null;
|
||||
bool is_trait = card.HasTrait(has_trait) || has_trait == null;
|
||||
return (is_type && is_team && is_trait);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectAddStatCount.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectAddStatCount.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c2dad1f6bd980ea4a9e1149cf5b2a8a7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
48
Assets/TcgEngine/Scripts/Effects/EffectAddStatRoll.cs
Normal file
48
Assets/TcgEngine/Scripts/Effects/EffectAddStatRoll.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Effect that adds or removes basic card/player stats such as hp, attack, mana, by the value of the dice roll
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/AddStatRoll", order = 10)]
|
||||
public class EffectAddStatRoll : EffectData
|
||||
{
|
||||
public EffectStatType type;
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Player target)
|
||||
{
|
||||
Game data = logic.GetGameData();
|
||||
|
||||
if (type == EffectStatType.HP)
|
||||
{
|
||||
target.hp += data.rolled_value;
|
||||
target.hp_max += data.rolled_value;
|
||||
}
|
||||
|
||||
if (type == EffectStatType.Mana)
|
||||
{
|
||||
target.mana += data.rolled_value;
|
||||
target.mana_max += data.rolled_value;
|
||||
target.mana = Mathf.Max(target.mana, 0);
|
||||
target.mana_max = Mathf.Clamp(target.mana_max, 0, GameplayData.Get().mana_max);
|
||||
}
|
||||
}
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
Game data = logic.GetGameData();
|
||||
|
||||
if (type == EffectStatType.Attack)
|
||||
target.attack += data.rolled_value;
|
||||
if (type == EffectStatType.HP)
|
||||
target.hp += data.rolled_value;
|
||||
if (type == EffectStatType.Mana)
|
||||
target.mana += data.rolled_value;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectAddStatRoll.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectAddStatRoll.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6348f6f17dc6dad49b4353b481ab7530
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
37
Assets/TcgEngine/Scripts/Effects/EffectAddTrait.cs
Normal file
37
Assets/TcgEngine/Scripts/Effects/EffectAddTrait.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Effect that adds card/player custom stats or traits
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/AddTrait", order = 10)]
|
||||
public class EffectAddTrait : EffectData
|
||||
{
|
||||
public TraitData trait;
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Player target)
|
||||
{
|
||||
target.AddTrait(trait.id, ability.value);
|
||||
}
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
target.AddTrait(trait.id, ability.value);
|
||||
}
|
||||
|
||||
public override void DoOngoingEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
target.AddOngoingTrait(trait.id, ability.value);
|
||||
}
|
||||
|
||||
public override void DoOngoingEffect(GameLogic logic, AbilityData ability, Card caster, Player target)
|
||||
{
|
||||
target.AddOngoingTrait(trait.id, ability.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectAddTrait.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectAddTrait.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7b77611b0961c0b418cc7d0bc67a574b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
56
Assets/TcgEngine/Scripts/Effects/EffectAttack.cs
Normal file
56
Assets/TcgEngine/Scripts/Effects/EffectAttack.cs
Normal file
@@ -0,0 +1,56 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Effect to make a card attack a target
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/Attack", order = 10)]
|
||||
public class EffectAttack : EffectData
|
||||
{
|
||||
public EffectAttackerType attacker_type;
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Player target)
|
||||
{
|
||||
Card attacker = GetAttacker(logic.GetGameData(), caster);
|
||||
if (attacker != null)
|
||||
{
|
||||
logic.AttackPlayer(attacker, target, true);
|
||||
}
|
||||
}
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
Card attack = GetAttacker(logic.GetGameData(), caster);
|
||||
if (attack != null)
|
||||
{
|
||||
logic.AttackTarget(attack, target, true);
|
||||
}
|
||||
}
|
||||
|
||||
public Card GetAttacker(Game gdata, Card caster)
|
||||
{
|
||||
if (attacker_type == EffectAttackerType.Self)
|
||||
return caster;
|
||||
if (attacker_type == EffectAttackerType.AbilityTriggerer)
|
||||
return gdata.GetCard(gdata.ability_triggerer);
|
||||
if (attacker_type == EffectAttackerType.LastPlayed)
|
||||
return gdata.GetCard(gdata.last_played);
|
||||
if (attacker_type == EffectAttackerType.LastTargeted)
|
||||
return gdata.GetCard(gdata.last_target);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public enum EffectAttackerType
|
||||
{
|
||||
Self = 1,
|
||||
AbilityTriggerer = 25,
|
||||
LastPlayed = 70,
|
||||
LastTargeted = 72,
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectAttack.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectAttack.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eeab8a74c77b5194fb59d11a21c81c58
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
48
Assets/TcgEngine/Scripts/Effects/EffectAttackRedirect.cs
Normal file
48
Assets/TcgEngine/Scripts/Effects/EffectAttackRedirect.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Effect to redirect an attack (usually triggered with OnBeforeAttack or OnBeforeDefend)
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/AttackRedirect", order = 10)]
|
||||
public class EffectAttackRedirect : EffectData
|
||||
{
|
||||
public EffectAttackerType attacker_type;
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Player target)
|
||||
{
|
||||
Card attacker = GetAttacker(logic.GetGameData(), caster);
|
||||
if (attacker != null)
|
||||
{
|
||||
logic.RedirectAttack(attacker, target);
|
||||
}
|
||||
}
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
Card attacker = GetAttacker(logic.GetGameData(), caster);
|
||||
if (attacker != null)
|
||||
{
|
||||
logic.RedirectAttack(attacker, target);
|
||||
}
|
||||
}
|
||||
|
||||
public Card GetAttacker(Game gdata, Card caster)
|
||||
{
|
||||
if (attacker_type == EffectAttackerType.Self)
|
||||
return caster;
|
||||
if (attacker_type == EffectAttackerType.AbilityTriggerer)
|
||||
return gdata.GetCard(gdata.ability_triggerer);
|
||||
if (attacker_type == EffectAttackerType.LastPlayed)
|
||||
return gdata.GetCard(gdata.last_played);
|
||||
if (attacker_type == EffectAttackerType.LastTargeted)
|
||||
return gdata.GetCard(gdata.last_target);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 47376520bff767443886bfdc5862ac4c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
24
Assets/TcgEngine/Scripts/Effects/EffectChangeOwner.cs
Normal file
24
Assets/TcgEngine/Scripts/Effects/EffectChangeOwner.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Change owner of target card to the owner of the caster (or the opponent player)
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/ChangeOwner", order = 10)]
|
||||
public class EffectChangeOwner : EffectData
|
||||
{
|
||||
public bool owner_opponent; //Change to self or opponent?
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
Game game = logic.GetGameData();
|
||||
Player tplayer = owner_opponent ? game.GetOpponentPlayer(caster.player_id) : game.GetPlayer(caster.player_id);
|
||||
logic.ChangeOwner(target, tplayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectChangeOwner.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectChangeOwner.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 05e842c49f2d3d04fa3627df2d352860
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
34
Assets/TcgEngine/Scripts/Effects/EffectClearStatus.cs
Normal file
34
Assets/TcgEngine/Scripts/Effects/EffectClearStatus.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Effect that removes a status,
|
||||
/// Will remove all status if the public field is empty
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/ClearStatus", order = 10)]
|
||||
public class EffectClearStatus : EffectData
|
||||
{
|
||||
public StatusData status;
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Player target)
|
||||
{
|
||||
if (status != null)
|
||||
target.RemoveStatus(status.effect);
|
||||
else
|
||||
target.status.Clear();
|
||||
}
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
if (status != null)
|
||||
target.RemoveStatus(status.effect);
|
||||
else
|
||||
target.status.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectClearStatus.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectClearStatus.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 95ded31f36bb44d49b15822b9f49572c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
27
Assets/TcgEngine/Scripts/Effects/EffectClearTemp.cs
Normal file
27
Assets/TcgEngine/Scripts/Effects/EffectClearTemp.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Clear temporary array of player's card
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/ClearTemp ", order = 10)]
|
||||
public class EffectClearTemp : EffectData
|
||||
{
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster)
|
||||
{
|
||||
Player player = logic.GameData.GetPlayer(caster.player_id);
|
||||
player.cards_temp.Clear();
|
||||
}
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
Player player = logic.GameData.GetPlayer(caster.player_id);
|
||||
player.cards_temp.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectClearTemp.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectClearTemp.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 976515f40b5981b4384453f913e610df
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
47
Assets/TcgEngine/Scripts/Effects/EffectCreate.cs
Normal file
47
Assets/TcgEngine/Scripts/Effects/EffectCreate.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Effects that creates a new card from a CardData
|
||||
/// Use for discover effects
|
||||
/// Unlike EffectSummon, this effect targets the card data you want to create, and goes into the pile selected here
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/Create", order = 10)]
|
||||
public class EffectCreate : EffectData
|
||||
{
|
||||
public PileType create_pile; //Better to not select Board here, for placing a card on board or in secret area, would suggest instead EffectSummon, or EffectPlay as chain after Create
|
||||
public bool create_opponent; //Add to opponent?
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, CardData target)
|
||||
{
|
||||
Player player = logic.GameData.GetPlayer(caster.player_id);
|
||||
if (create_opponent)
|
||||
player = logic.GameData.GetOpponentPlayer(caster.player_id);
|
||||
|
||||
Card card = Card.Create(target, caster.VariantData, player);
|
||||
logic.GameData.last_summoned = card.uid;
|
||||
|
||||
if (create_pile == PileType.Deck)
|
||||
player.cards_deck.Add(card);
|
||||
|
||||
if (create_pile == PileType.Discard)
|
||||
player.cards_discard.Add(card);
|
||||
|
||||
if (create_pile == PileType.Hand)
|
||||
player.cards_hand.Add(card);
|
||||
|
||||
if (create_pile == PileType.Temp)
|
||||
player.cards_temp.Add(card);
|
||||
}
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
DoEffect(logic, ability, caster, target.CardData); //Create a copy
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectCreate.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectCreate.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9a0c7a36491a2fd4d89a12026a89bf8b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
37
Assets/TcgEngine/Scripts/Effects/EffectDamage.cs
Normal file
37
Assets/TcgEngine/Scripts/Effects/EffectDamage.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Effect that damages a card or a player (lose hp)
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/Damage", order = 10)]
|
||||
public class EffectDamage : EffectData
|
||||
{
|
||||
public TraitData bonus_damage;
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Player target)
|
||||
{
|
||||
int damage = GetDamage(logic.GameData, caster, ability.value);
|
||||
logic.DamagePlayer(caster, target, damage);
|
||||
}
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
int damage = GetDamage(logic.GameData, caster, ability.value);
|
||||
logic.DamageCard(caster, target, damage, true);
|
||||
}
|
||||
|
||||
private int GetDamage(Game data, Card caster, int value)
|
||||
{
|
||||
Player player = data.GetPlayer(caster.player_id);
|
||||
int damage = value + caster.GetTraitValue(bonus_damage) + player.GetTraitValue(bonus_damage);
|
||||
return damage;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectDamage.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectDamage.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 31aa9b0b846e37e47bb7896cc026a560
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
20
Assets/TcgEngine/Scripts/Effects/EffectDestroy.cs
Normal file
20
Assets/TcgEngine/Scripts/Effects/EffectDestroy.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/Destroy", order = 10)]
|
||||
public class EffectDestroy : EffectData
|
||||
{
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
if (logic.GameData.IsOnBoard(target))
|
||||
logic.KillCard(caster, target);
|
||||
else
|
||||
logic.DiscardCard(target);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectDestroy.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectDestroy.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aa61552eb31ab454d9ded72c8016fe4c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
25
Assets/TcgEngine/Scripts/Effects/EffectDestroyEquip.cs
Normal file
25
Assets/TcgEngine/Scripts/Effects/EffectDestroyEquip.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/DestroyEquip", order = 10)]
|
||||
public class EffectDestroyEquip : EffectData
|
||||
{
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
if (target.CardData.IsEquipment())
|
||||
{
|
||||
logic.DiscardCard(target);
|
||||
}
|
||||
else
|
||||
{
|
||||
Card etarget = logic.GameData.GetCard(target.equipped_uid);
|
||||
logic.DiscardCard(etarget);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectDestroyEquip.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectDestroyEquip.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1c1a496036c67554aa616a81af534505
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
26
Assets/TcgEngine/Scripts/Effects/EffectDiscard.cs
Normal file
26
Assets/TcgEngine/Scripts/Effects/EffectDiscard.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Effect to discard cards from hand
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/Discard", order = 10)]
|
||||
public class EffectDiscard : EffectData
|
||||
{
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Player target)
|
||||
{
|
||||
logic.DrawDiscardCard(target, ability.value); //Discard first card of deck
|
||||
}
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
logic.DiscardCard(target);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectDiscard.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectDiscard.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0e85663735c801741b519c6885e7a10b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
27
Assets/TcgEngine/Scripts/Effects/EffectDraw.cs
Normal file
27
Assets/TcgEngine/Scripts/Effects/EffectDraw.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Effect to draw cards
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/Draw", order = 10)]
|
||||
public class EffectDraw : EffectData
|
||||
{
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Player target)
|
||||
{
|
||||
logic.DrawCard(target, ability.value);
|
||||
}
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
Player player = logic.GameData.GetPlayer(target.player_id);
|
||||
logic.DrawCard(player, ability.value);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectDraw.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectDraw.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9908c302fc7ade44f9e3b5dd67215ac1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
23
Assets/TcgEngine/Scripts/Effects/EffectExhaust.cs
Normal file
23
Assets/TcgEngine/Scripts/Effects/EffectExhaust.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Effect that exhaust or unexhaust a card (means it can no longer perform actions or will be able to perform another action)
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/Exhaust", order = 10)]
|
||||
public class EffectExhaust : EffectData
|
||||
{
|
||||
public bool exhausted;
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
target.exhausted = exhausted;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectExhaust.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectExhaust.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3c57f910c07858e429858dcd85c2c6ce
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
27
Assets/TcgEngine/Scripts/Effects/EffectHeal.cs
Normal file
27
Assets/TcgEngine/Scripts/Effects/EffectHeal.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Effects that heals a card or player (hp)
|
||||
/// It cannot restore more than the original hp, use AddStats to go beyond original
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/Heal", order = 10)]
|
||||
public class EffectHeal : EffectData
|
||||
{
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Player target)
|
||||
{
|
||||
logic.HealPlayer(target, ability.value);
|
||||
}
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
logic.HealCard(target, ability.value);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectHeal.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectHeal.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c56d85d4432184d48b88794a59af89cb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
34
Assets/TcgEngine/Scripts/Effects/EffectMana.cs
Normal file
34
Assets/TcgEngine/Scripts/Effects/EffectMana.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Effect to gain/lose mana (player)
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/Mana", order = 10)]
|
||||
public class EffectMana : EffectData
|
||||
{
|
||||
public bool increase_value;
|
||||
public bool increase_max;
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Player target)
|
||||
{
|
||||
if (increase_max)
|
||||
{
|
||||
target.mana_max += ability.value;
|
||||
target.mana_max = Mathf.Clamp(target.mana_max, 0, GameplayData.Get().mana_max);
|
||||
}
|
||||
|
||||
if(increase_value)
|
||||
{
|
||||
target.mana += ability.value;
|
||||
target.mana = Mathf.Max(target.mana, 0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectMana.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectMana.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2e65c1fe98ead164d977a53b37a9a591
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
30
Assets/TcgEngine/Scripts/Effects/EffectPlay.cs
Normal file
30
Assets/TcgEngine/Scripts/Effects/EffectPlay.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Effect to play a card from your hand for free
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/Play", order = 10)]
|
||||
public class EffectPlay : EffectData
|
||||
{
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
Game game = logic.GetGameData();
|
||||
Player player = game.GetPlayer(caster.player_id);
|
||||
Slot slot = player.GetRandomEmptySlot(logic.GetRandom());
|
||||
|
||||
player.RemoveCardFromAllGroups(target);
|
||||
player.cards_hand.Add(target);
|
||||
|
||||
if (slot != Slot.None)
|
||||
{
|
||||
logic.PlayCard(target, slot, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectPlay.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectPlay.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 17b5dc1a9aa93f34190de14c3de7f490
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
22
Assets/TcgEngine/Scripts/Effects/EffectRemoveAbility.cs
Normal file
22
Assets/TcgEngine/Scripts/Effects/EffectRemoveAbility.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Effect that removes an ability from a card
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/RemoveAbility", order = 10)]
|
||||
public class EffectRemoveAbility : EffectData
|
||||
{
|
||||
public AbilityData remove_ability;
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
target.RemoveAbility(remove_ability);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectRemoveAbility.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectRemoveAbility.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 96e8be4ff6967fa4998a703fdb33c632
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
27
Assets/TcgEngine/Scripts/Effects/EffectRemoveTrait.cs
Normal file
27
Assets/TcgEngine/Scripts/Effects/EffectRemoveTrait.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Effect that removes card/player custom stats or traits
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/RemoveTrait", order = 10)]
|
||||
public class EffectRemoveTrait : EffectData
|
||||
{
|
||||
public TraitData trait;
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Player target)
|
||||
{
|
||||
target.RemoveTrait(trait.id);
|
||||
}
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
target.RemoveTrait(trait.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectRemoveTrait.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectRemoveTrait.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 74c7cc409b7e75e45a132989d6562968
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
64
Assets/TcgEngine/Scripts/Effects/EffectRepeat.cs
Normal file
64
Assets/TcgEngine/Scripts/Effects/EffectRepeat.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Repeat an ability X times
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/Repeat", order = 10)]
|
||||
public class EffectRepeat : EffectData
|
||||
{
|
||||
public AbilityData ability;
|
||||
public EffectRepeatType type;
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData iability, Card caster)
|
||||
{
|
||||
int count = GetRepeatCount(logic.GameData, iability);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
Card triggerer = logic.GameData.GetCard(logic.GameData.ability_triggerer);
|
||||
logic.TriggerAbilityDelayed(this.ability, caster, triggerer);
|
||||
}
|
||||
}
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData iability, Card caster, Player target)
|
||||
{
|
||||
int count = GetRepeatCount(logic.GameData, iability);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
Card triggerer = logic.GameData.GetCard(logic.GameData.ability_triggerer);
|
||||
logic.TriggerAbilityDelayed(this.ability, caster, triggerer);
|
||||
}
|
||||
}
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData iability, Card caster, Card target)
|
||||
{
|
||||
int count = GetRepeatCount(logic.GameData, iability);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
Card triggerer = logic.GameData.GetCard(logic.GameData.ability_triggerer);
|
||||
logic.TriggerAbilityDelayed(this.ability, caster, triggerer);
|
||||
}
|
||||
}
|
||||
|
||||
public int GetRepeatCount(Game game, AbilityData iability)
|
||||
{
|
||||
if (type == EffectRepeatType.SelectedValue)
|
||||
return game.selected_value;
|
||||
if (type == EffectRepeatType.FixedValue)
|
||||
return iability.value;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public enum EffectRepeatType
|
||||
{
|
||||
FixedValue,
|
||||
SelectedValue
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectRepeat.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectRepeat.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 258640ef6d015024fa1cfa06d43dd535
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
20
Assets/TcgEngine/Scripts/Effects/EffectResetStat.cs
Normal file
20
Assets/TcgEngine/Scripts/Effects/EffectResetStat.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Effect to reset all stats to their original values
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/ResetStat", order = 10)]
|
||||
public class EffectResetStat : EffectData
|
||||
{
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
target.SetCard(target.CardData, target.VariantData);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectResetStat.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectResetStat.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6dfbab2e89e39c041b67dd70abfdee9a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
32
Assets/TcgEngine/Scripts/Effects/EffectRoll.cs
Normal file
32
Assets/TcgEngine/Scripts/Effects/EffectRoll.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Shuffle Deck
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/RollDice", order = 10)]
|
||||
public class EffectRoll : EffectData
|
||||
{
|
||||
public int dice = 6;
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
logic.RollRandomValue(dice);
|
||||
}
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Player target)
|
||||
{
|
||||
logic.RollRandomValue(dice);
|
||||
}
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Slot target)
|
||||
{
|
||||
logic.RollRandomValue(dice);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectRoll.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectRoll.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b333dab7cbdc167479ffe5fc58140365
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
30
Assets/TcgEngine/Scripts/Effects/EffectSelectedValue.cs
Normal file
30
Assets/TcgEngine/Scripts/Effects/EffectSelectedValue.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Add/Reduce selected value
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/SelectedValue", order = 10)]
|
||||
public class EffectSelectedValue : EffectData
|
||||
{
|
||||
public EffectOperatorInt oper;
|
||||
public int value;
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Player target)
|
||||
{
|
||||
logic.GameData.selected_value = AddOrSet(logic.GameData.selected_value, oper, value);
|
||||
}
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
logic.GameData.selected_value = AddOrSet(logic.GameData.selected_value, oper, value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectSelectedValue.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectSelectedValue.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d442aac2497debe4f88101a4bd6c5ae5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
64
Assets/TcgEngine/Scripts/Effects/EffectSendPile.cs
Normal file
64
Assets/TcgEngine/Scripts/Effects/EffectSendPile.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
//Sends the target card to a pile of your choice (deck/discard/hand)
|
||||
//Dont use to send to board since it needs a slot, use EffectPlay instead to send to board
|
||||
//Also dont send to discard from the board because it wont trigger OnKill effects, use EffectDestroy instead
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/SendPile", order = 10)]
|
||||
public class EffectSendPile : EffectData
|
||||
{
|
||||
public PileType pile;
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
Game data = logic.GetGameData();
|
||||
Player player = data.GetPlayer(target.player_id);
|
||||
|
||||
if (pile == PileType.Deck)
|
||||
{
|
||||
player.RemoveCardFromAllGroups(target);
|
||||
player.cards_deck.Add(target);
|
||||
target.Clear();
|
||||
}
|
||||
|
||||
if (pile == PileType.Hand)
|
||||
{
|
||||
player.RemoveCardFromAllGroups(target);
|
||||
player.cards_hand.Add(target);
|
||||
target.Clear();
|
||||
}
|
||||
|
||||
if (pile == PileType.Discard)
|
||||
{
|
||||
player.RemoveCardFromAllGroups(target);
|
||||
player.cards_discard.Add(target);
|
||||
target.Clear();
|
||||
}
|
||||
|
||||
if (pile == PileType.Temp)
|
||||
{
|
||||
player.RemoveCardFromAllGroups(target);
|
||||
player.cards_temp.Add(target);
|
||||
target.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum PileType
|
||||
{
|
||||
None = 0,
|
||||
Board = 10,
|
||||
Hand = 20,
|
||||
Deck = 30,
|
||||
Discard = 40,
|
||||
Secret = 50,
|
||||
Equipped = 60,
|
||||
Temp = 90,
|
||||
}
|
||||
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectSendPile.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectSendPile.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ab52cf67e291b114fa5fbdb2ad5796a8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
55
Assets/TcgEngine/Scripts/Effects/EffectSetStat.cs
Normal file
55
Assets/TcgEngine/Scripts/Effects/EffectSetStat.cs
Normal file
@@ -0,0 +1,55 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Effect that sets basic stats (hp/attack/mana) to a specific value
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/SetStat", order = 10)]
|
||||
public class EffectSetStat : EffectData
|
||||
{
|
||||
public EffectStatType type;
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Player target)
|
||||
{
|
||||
if (type == EffectStatType.HP)
|
||||
{
|
||||
target.hp = ability.value;
|
||||
}
|
||||
|
||||
if (type == EffectStatType.Mana)
|
||||
{
|
||||
target.mana = ability.value;
|
||||
target.mana = Mathf.Max(target.mana, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
if (type == EffectStatType.Attack)
|
||||
target.attack = ability.value;
|
||||
if (type == EffectStatType.Mana)
|
||||
target.mana = ability.value;
|
||||
if (type == EffectStatType.HP)
|
||||
{
|
||||
target.hp = ability.value;
|
||||
target.damage = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public override void DoOngoingEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
if (type == EffectStatType.Attack)
|
||||
target.attack = ability.value;
|
||||
if (type == EffectStatType.HP)
|
||||
target.hp = ability.value;
|
||||
if (type == EffectStatType.Mana)
|
||||
target.mana = ability.value;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectSetStat.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectSetStat.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bc6dd82eee4f954428ac29e02c0dd22c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
37
Assets/TcgEngine/Scripts/Effects/EffectSetTrait.cs
Normal file
37
Assets/TcgEngine/Scripts/Effects/EffectSetTrait.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Effect that sets custom stats to a specific value
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/SetStatCustom", order = 10)]
|
||||
public class EffectSetTrait : EffectData
|
||||
{
|
||||
public TraitData trait;
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Player target)
|
||||
{
|
||||
target.SetTrait(trait.id, ability.value);
|
||||
}
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
target.SetTrait(trait.id, ability.value);
|
||||
}
|
||||
|
||||
public override void DoOngoingEffect(GameLogic logic, AbilityData ability, Card caster, Player target)
|
||||
{
|
||||
target.SetTrait(trait.id, ability.value);
|
||||
}
|
||||
|
||||
public override void DoOngoingEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
target.SetTrait(trait.id, ability.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectSetTrait.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectSetTrait.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 68bcb42ba7f34b0489fcbe3bb0bf518c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
20
Assets/TcgEngine/Scripts/Effects/EffectShuffle.cs
Normal file
20
Assets/TcgEngine/Scripts/Effects/EffectShuffle.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Shuffle Deck
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/Shuffle", order = 10)]
|
||||
public class EffectShuffle : EffectData
|
||||
{
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Player target)
|
||||
{
|
||||
logic.ShuffleDeck(target.cards_deck);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectShuffle.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectShuffle.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 869271a3f5e5bef4197501a174ba09df
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
40
Assets/TcgEngine/Scripts/Effects/EffectSummon.cs
Normal file
40
Assets/TcgEngine/Scripts/Effects/EffectSummon.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
//Effect to Summon an entirely new card (not in anyones deck)
|
||||
//And places it on the board (if target slot) or hand (if target player)
|
||||
//Unlike EffectCreate, this effect targets where the card goes, and the carddata is selected on the effect
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/Summon", order = 10)]
|
||||
public class EffectSummon : EffectData
|
||||
{
|
||||
public CardData summon;
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Player target)
|
||||
{
|
||||
logic.SummonCardHand(target, summon, caster.VariantData); //Summon in hand instead of board when target a player
|
||||
}
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
Player player = logic.GameData.GetPlayer(caster.player_id);
|
||||
logic.SummonCard(player, summon, caster.VariantData, target.slot); //Assumes the target has just been killed, so the slot is empty
|
||||
}
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Slot target)
|
||||
{
|
||||
Player player = logic.GameData.GetPlayer(caster.player_id);
|
||||
logic.SummonCard(player, summon, caster.VariantData, target);
|
||||
}
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, CardData target)
|
||||
{
|
||||
Player player = logic.GameData.GetPlayer(caster.player_id);
|
||||
logic.SummonCardHand(player, target, caster.VariantData); //Summon in hand instead of board when target a carddata
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectSummon.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectSummon.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6387beb9a48f723469e5bb1532d7f51f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
22
Assets/TcgEngine/Scripts/Effects/EffectTransform.cs
Normal file
22
Assets/TcgEngine/Scripts/Effects/EffectTransform.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TcgEngine.Gameplay;
|
||||
|
||||
namespace TcgEngine
|
||||
{
|
||||
/// <summary>
|
||||
/// Effect to transform a card into another card
|
||||
/// </summary>
|
||||
|
||||
[CreateAssetMenu(fileName = "effect", menuName = "TcgEngine/Effect/Transform", order = 10)]
|
||||
public class EffectTransform : EffectData
|
||||
{
|
||||
public CardData transform_to;
|
||||
|
||||
public override void DoEffect(GameLogic logic, AbilityData ability, Card caster, Card target)
|
||||
{
|
||||
logic.TransformCard(target, transform_to);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Effects/EffectTransform.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Effects/EffectTransform.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2df080b90a55a824caa1fb5256aaa2dc
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user