Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fixing #305

Merged
merged 4 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions scripts/battle/GameState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ private void HideDeadEnemies()
}

public void PushCardStack(Card card) { ComboStack.Add(card); }

private List<string> _blockCards = new List<string> { "card_LowerBlock", "card_UpperBlock", "card_FullBlock" };

public Combo ComboCompare() {
foreach (Combo combo in AllCombos) {
Expand All @@ -125,6 +127,10 @@ public Combo ComboCompare() {

bool match = true;
for (int i = 1; i <= count; i++) {
if (_blockCards.Contains(ComboStack[^i].Id) && "card_FullBlock" == combo.CardList[^i].Id)
{
continue;
}
if (ComboStack[^i].Id != combo.CardList[^i].Id) {
match = false;
break;
Expand Down
10 changes: 10 additions & 0 deletions scripts/battle/card/BloodOnSand.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using GLADIATE.scripts.battle.target;

namespace GLADIATE.scripts.battle.card;

public class BloodOnSand : Card {
public override void Play(GameState gameState, ITarget target, ITarget player) {
player.DirectDamage(6);
base.Play(gameState, target, player);
}
}
2 changes: 1 addition & 1 deletion scripts/battle/card/CardFactory.cs
emmettirl marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public static class CardFactory {
private static Dictionary<string, Func<Card>> TypeDictionary = new() {
{ "card_reckless", () => new StunCard() },
{ "card_Spartackle", () => new Spartackle() },
{ "card_BloodOnTheSand", () => new SelfDamageCard() },
{ "card_BloodOnTheSand", () => new BloodOnSand() },
{ "card_gladius", () => new Gladius() },
{ "card_Grapple", () => new ModifierCard() },
{ "card_FlyingCrossBody", () => new FlyingCrossBody() },
Expand Down