Skip to content

Commit

Permalink
Merge pull request #310 from DecentralCardGame/304-change-effect-limi…
Browse files Browse the repository at this point in the history
…t-on-action-cards

max 8 effects on actions
  • Loading branch information
patrickwieth authored Aug 27, 2024
2 parents 06f793c + 00a5e4d commit 88fa85e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/views/CardCreatorPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1270,15 +1270,23 @@ export default {
this.isAbilityModalVisible = true;
if (type === "root") {
if (this.abilities.length >= 3) {
if (this.model.type != "Action" && this.abilities.length >= 3) {
this.notifyFail(
"Number of Abilities",
"A card can only have a maximum of 3 Abilities.",
);
this.isAbilityModalVisible = false;
return;
}
if (this.model.type === "no type" || this.model.type === undefined) {
else if (this.model.type == "Action" && this.abilities.length >= 8){
this.notifyFail(
"Number of Effects",
"An Action card can only have a maximum of 8 Effects.",
);
this.isAbilityModalVisible = false;
return;
}
else if (this.model.type === "no type" || this.model.type === undefined) {
this.notifyFail(
"No Type",
"Card has no type, please pick a type before setting abilities.",
Expand Down

0 comments on commit 88fa85e

Please sign in to comment.