Skip to content

Commit

Permalink
feat(Game): Big-Bad-Wolf role implemented. Closes #80
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinezanardi committed Dec 26, 2020
1 parent bfd14c4 commit 39b1f54
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 23 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* [#76](https://github.com/antoinezanardi/werewolves-assistant-web/issues/76) - Two Sisters role implemented.
* [#77](https://github.com/antoinezanardi/werewolves-assistant-web/issues/77) - Three Brothers role implemented.
* [#78](https://github.com/antoinezanardi/werewolves-assistant-web/issues/78) - Wild Child role implemented.
* [#80](https://github.com/antoinezanardi/werewolves-assistant-web/issues/80) - Big-Bad-Wolf role implemented.

### 🐛 Bug fixes

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ Two versions are available for testing this project:

## <a name="roles-available">🃏 Roles available</a>

On this current version [![GitHub release](https://img.shields.io/github/release/antoinezanardi/werewolves-assistant-web.svg)](https://GitHub.com/antoinezanardi/werewolves-assistant-web/releases/), **11 different roles** are available to play:
On this current version [![GitHub release](https://img.shields.io/github/release/antoinezanardi/werewolves-assistant-web.svg)](https://GitHub.com/antoinezanardi/werewolves-assistant-web/releases/), **13 different roles** are available to play:

- **<img src="https://werewolves-assistant-api.antoinezanardi.fr/img/roles/werewolf.png" width="25"/> The Werewolf**
- **<img src="https://werewolves-assistant-api.antoinezanardi.fr/img/roles/big-bad-wolf.png" width="25"/> The Big-Bad-Wolf**
- **<img src="https://werewolves-assistant-api.antoinezanardi.fr/img/roles/villager.png" width="25"/> The Villager**
- **<img src="https://werewolves-assistant-api.antoinezanardi.fr/img/roles/villager.png" width="25"/> The Villager-Villager**
- **<img src="https://werewolves-assistant-api.antoinezanardi.fr/img/roles/seer.png" width="25"/> The Seer**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import inLoveSVG from "@/assets/svg/attributes/in-love.svg";
import twoSistersSVG from "@/assets/svg/roles/two-sisters.svg";
import threeBrothersPNG from "@/assets/img/roles/three-brothers.png";
import worshipedSVG from "@/assets/svg/attributes/worshiped.svg";
import bigBadWolfSVG from "@/assets/svg/roles/big-bad-wolf.svg";
import RoleImage from "@/components/shared/Game/Role/RoleImage";
import RoleText from "@/components/shared/Game/Role/RoleText";
Expand Down Expand Up @@ -93,20 +94,21 @@ export default {
"two-sisters": { "meet-each-other": twoSistersSVG },
"three-brothers": { "meet-each-other": threeBrothersPNG },
"wild-child": { "choose-model": worshipedSVG },
"big-bad-wolf": { eat: bigBadWolfSVG },
};
return actionImageSource[play.source] ? actionImageSource[play.source][play.action] : undefined;
},
actionIconClass() {
const { targets, votes, side, action } = this.gameHistoryEntry.play;
const { targets, votes, side, action, source } = this.gameHistoryEntry.play;
if (action === "meet-each-other") {
return "fa-comments";
return source === "lovers" ? "fa-grin-hearts" : "fa-comments";
} else if (targets && targets.length || votes && votes.length || side) {
return "fa-arrow-right";
}
return "fa-ban";
},
actionText() {
const { targets, votes, side, action } = this.gameHistoryEntry.play;
const { targets, votes, side, action, source } = this.gameHistoryEntry.play;
if (action !== "meet-each-other" && (!targets || !targets.length) && (!votes || !votes.length) && !side) {
return this.$t(`GameSummaryHistoryLine.skipTurn`);
} else if (this.gameHistoryEntry.play.action === "use-potion") {
Expand All @@ -117,7 +119,7 @@ export default {
}
return this.$t(`GameSummaryHistoryLine.actions.use-potion.death`);
}
return this.$t(`GameSummaryHistoryLine.actions.${this.gameHistoryEntry.play.action}`);
return this.$t(`GameSummaryHistoryLine.actions.${source}.${action}`);
},
},
};
Expand Down
69 changes: 51 additions & 18 deletions src/plugins/vue-i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -521,24 +521,57 @@
"day": "Jour",
"night": "Nuit",
"actions": {
"eat": "ont décidé de manger",
"use-potion": {
"life": "a utilisé sa potion de vie sur",
"death": "a utilisé sa potion de mort sur",
"both": "a utilisé ses potions sur"
},
"look": "a vu le rôle de",
"shoot": "a tiré sur",
"protect": "a protégé",
"mark": "a marqué",
"elect-sheriff": "a élu comme maire",
"vote": "a décidé de pendre",
"delegate": "a légué son rôle de maire à",
"settle-votes": "a tranché pour pendre",
"choose-side": "a choisi comme camp",
"charm": "a rendu amoureux",
"meet-each-other": "se sont concertés",
"choose-model": "a choisi comme modèle"
"werewolves": {
"eat": "ont décidé de manger"
},
"big-bad-wolf": {
"eat": "a décidé de manger"
},
"witch": {
"use-potion": {
"life": "a utilisé sa potion de vie sur",
"death": "a utilisé sa potion de mort sur",
"both": "a utilisé ses potions sur"
}
},
"seer": {
"look": "a vu le rôle de"
},
"hunter": {
"shoot": "a tiré sur"
},
"guard": {
"protect": "a protégé"
},
"raven": {
"mark": "a marqué"
},
"all": {
"elect-sheriff": "a élu comme maire",
"vote": "a décidé de pendre"
},
"sheriff": {
"delegate": "a légué son rôle de maire à",
"settle-votes": "a tranché pour pendre"
},
"dog-wolf": {
"choose-side": "a choisi comme camp"
},
"cupid": {
"charm": "a rendu amoureux"
},
"two-sisters": {
"meet-each-other": "se sont concertés"
},
"three-brothers": {
"meet-each-other": "se sont concertés"
},
"lovers": {
"meet-each-other": "se sont rencontrés et ont eu le coup de foudre"
},
"wild-child": {
"choose-model": "a choisi comme modèle"
}
},
"skipTurn": "a passé son tour"
},
Expand Down

0 comments on commit 39b1f54

Please sign in to comment.