<<nobr>>
/*current player*/
<<set _CurPlay to 0>>
/*what deck does this player use */
<<if $PlayerData[_CurPlay][4] == 5>>
<<set _CurPlayDeck to ("Player" + _CurPlay + "WWDeck")>>
<<elseif $PlayerData[_CurPlay][4] == 0>>
<<set _CurPlayDeck to ("Player" + _CurPlay + "Deck")>>
<<else>>
<<set _CurPlayDeck to ("Player" + _CurPlay + "IDeck")>>
<</if>>
<<do tag "SuffleCards">>
<<if State.variables[_CurPlayDeck].length == 0>>
<<if $PlayerData[0][4] is 0>>
<<set _wkDeck to clone($AllHumanDeck)>>
<<elseif $PlayerData[0][4] > 0 && $PlayerData[0][4] <= 4>>
<<set _wkDeck to clone($AllInfectedDeck)>>
<<elseif $PlayerData[0][4] is 5>>
<<set _wkDeck to clone($AllWerewolfDeck)>>
<</if>>
<<for _i to 0; _wkDeck[0] > _i; _i++>>
<<set _check to 1>>
<<for _check == 1>>
<<if $PlayerData[0][4] is 0>>
<<set _ran to random(1,$AllHumanDeck[0])>>
<<elseif $PlayerData[0][4] > 0 && $PlayerData[0][4] <= 4>>
<<set _ran to random(1,$AllInfectedDeck[0])>>
<<elseif $PlayerData[0][4] is 5>>
<<set _ran to random(1,$AllWerewolfDeck[0])>>
<</if>>
<<if _wkDeck[_ran] > 0>>
<<set _check to 0>>
<<if $PlayerData[0][4] is 0>>
<<set $Player0Deck.push($HumanCardBank[(_ran - 1)])>>
<<elseif $PlayerData[0][4] > 0 && $PlayerData[0][4] <= 4>>
<<set $Player0IDeck.push($InfectedCardBank[(_ran - 1)])>>
<<elseif $PlayerData[0][4] is 5>>
<<set $Player0WWDeck.push($WerewolfCardBank[(_ran - 1)])>>
<</if>>
<<set _wkDeck[_ran]-->>
<</if>>
<</for>>
<</for>>
<</if>>
<</do>>
<<set $SelectedCard to -1>>
<<do tag "PlayerInfo">><br><br>
$PlayerData[1][0]: $PlayerData[1][1] HP || $PlayerData[1][2] Physical || $PlayerData[1][3] Spiritual ||<br>
$PlayerData[2][0]: $PlayerData[2][1] HP || $PlayerData[2][2] Physical || $PlayerData[2][3] Spiritual ||<br>
$PlayerData[3][0]: $PlayerData[3][1] HP || $PlayerData[3][2] Physical || $PlayerData[3][3] Spiritual ||<br>
$PlayerData[4][0]: $PlayerData[4][1] HP || $PlayerData[4][2] Physical || $PlayerData[4][3] Spiritual ||<br>
<</do>>
<script>
function SelectCards(card){
var prev = SugarCube.State.variables.SelectedCard;
if (prev == -1){
card.classList.add("handCardsSelected");
} else if( ("Card" + prev) == card.id){
return;
} else if(card.classList.contains("handCardsUsed")){
return;
} else if (prev == -2){
card.classList.add("handCardsSelected");
}
else {
document.getElementById(("Card" + prev)).classList.remove("handCardsSelected");
card.classList.add("handCardsSelected");
}
if(card.id == "Card1"){
SugarCube.State.variables.SelectedCard = 1;
} else if(card.id == "Card2"){
SugarCube.State.variables.SelectedCard = 2;
} else if(card.id == "Card3"){
SugarCube.State.variables.SelectedCard = 3;
} else if(card.id == "Card4"){
SugarCube.State.variables.SelectedCard = 4;
} else{
SugarCube.State.variables.SelectedCard = 5;
}
}
</script><</nobr>>
Select Player:
<<listbox "$SelectPlayer" autoselect>>
<<option $PlayerData[0][0] 0>>
<<option $PlayerData[1][0] 1>>
<<option $PlayerData[2][0] 2>>
<<option $PlayerData[3][0] 3>>
<<option $PlayerData[4][0] 4>>
<</listbox>>
Deck:
<<nobr>>
<div id="Hand">
<div class="handCards" id="Card1" onclick="SelectCards(this);">
<div class="crdImg"><img @src= State.variables[_CurPlayDeck][0][0]></div>
<div class="crdText"><<print State.variables[_CurPlayDeck][0][1]>></div>
</div>
<div class="handCards" id="Card2" onclick="SelectCards(this);">
<div class="crdImg"><img @src= State.variables[_CurPlayDeck][1][0]></div>
<div class="crdText"><<print State.variables[_CurPlayDeck][1][1]>></div>
</div>
<div class="handCards" id="Card3" onclick="SelectCards(this);">
<div class="crdImg"><img @src= State.variables[_CurPlayDeck][2][0]></div>
<div class="crdText"><<print State.variables[_CurPlayDeck][2][1]>></div>
</div>
<div class="handCards" id="Card4" onclick="SelectCards(this);">
<div class="crdImg"><img @src= State.variables[_CurPlayDeck][3][0]></div>
<div class="crdText"><<print State.variables[_CurPlayDeck][3][1]>></div>
</div>
<div class="handCards" id="Card5" onclick="SelectCards(this);">
<div class="crdImg"><img @src= State.variables[_CurPlayDeck][4][0]></div>
<div class="crdText"><<print State.variables[_CurPlayDeck][4][1]>></div>
</div>
</div>
<</nobr>>
<<button "Use Card">>
/* Do stuff from the card */
/* Loop thu cards and find the card selected. Then do stuff with it. */
<<for _iCard to 1; (5 + 1) > _iCard; _iCard++>>
<<if $SelectedCard == _iCard>>
<<set _card to (_iCard-1)>>
<<set _cardID to ("#Card" + _iCard)>>
<<print _CurPlayDeck>>
/* checks to see if player playing the card can actualy play it */
<<if $PlayerData[_CurPlay][2] - State.variables[_CurPlayDeck][_card][5] >= 0 && $PlayerData[_CurPlay][3] - State.variables[_CurPlayDeck][_card][6] >= 0>>
<<removeclass _cardID "handCardsSelected">>
<<addclass _cardID "handCardsUsed">>
/* If the cards target is anyone */
<<if State.variables[_CurPlayDeck][_card][2] is -1>>
/*remove cost from player who played it */
<<set $PlayerData[_CurPlay][2] -= State.variables[_CurPlayDeck][_card][5]>>
<<set $PlayerData[_CurPlay][3] -= State.variables[_CurPlayDeck][_card][6]>>
/*remove energy from target player */
<<set $PlayerData[$SelectPlayer][2] += State.variables[_CurPlayDeck][_card][3]>>
<<set $PlayerData[$SelectPlayer][3] += State.variables[_CurPlayDeck][_card][4]>>
<<set _playChance to true>>
/*check to see if card has a chance to do something special.
If the card does not have it, it will work 100% of the time.
If the card does have it, it will work so long as the rand num is under the given chance num. */
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Chance")>>
<<set _ranChance to random(0,100)>>
<<if _ranChance > parseInt(State.variables[_CurPlayDeck][_card][7]["Chance"],10)>>
<<set _playChance to false>>
<</if>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Health") && _playChance>>
<<set $PlayerData[$SelectPlayer][1] += parseInt(State.variables[_CurPlayDeck][_card][7]["Health"], 10)>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Invest") && _playChance>>
<<set $FoundWerewolfItems.push($WerewolfItemList.pop())>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Sus") && _playChance>>
<<for _lo to 0; $PlayerData.length > _lo; _lo++>>
<<if $PlayerData[_lo][11][$SelectPlayer] + parseInt(State.variables[_CurPlayDeck][_card][7]["Sus"],10) < 0>>
<<set $PlayerData[_lo][11][$SelectPlayer] = 0>>
<<elseif $PlayerData[_lo][11][$SelectPlayer] != -1>>
<<set $PlayerData[_lo][11][$SelectPlayer] += parseInt(State.variables[_CurPlayDeck][_card][7]["Sus"],10)>>
<</if>>
<</for>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("InfectR") && _playChance>>
<<set $RateOfInfection += parseInt(State.variables[_CurPlayDeck][_card][7]["InfectR"], 10)>>
<<if $RateOfInfection < 0>>
<<set $RateOfInfection to 0>>
<</if>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Infect") && _playChance>>
<<set $CurrentInfectedPeople += parseInt(State.variables[_CurPlayDeck][_card][7]["Infect"], 10)>>
<<if $CurrentInfectedPeople < 0>>
<<set $CurrentInfectedPeople to 0>>
<</if>>
<</if>>
/* The card must be targeting whoever played it */
<<else>>
<<set $PlayerData[_CurPlay][2] -= State.variables[_CurPlayDeck][_card][5]>>
<<set $PlayerData[_CurPlay][3] -= State.variables[_CurPlayDeck][_card][6]>>
<<set $PlayerData[_CurPlay][2] += State.variables[_CurPlayDeck][_card][3]>>
<<set $PlayerData[_CurPlay][3] += State.variables[_CurPlayDeck][_card][4]>>
<<set _playChance to true>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Chance")>>
<<set _ranChance to random(0,100)>>
<<if _ranChance > parseInt(State.variables[_CurPlayDeck][_iCard][7]["Chance"],10)>>
<<set _playChance to false>>
<</if>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Health")>>
<<set $PlayerData[_CurPlay][1] += parseInt(State.variables[_CurPlayDeck][_card][7]["Health"], 10)>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Invest") && _playChance>>
<<set $FoundWerewolfItems.push($WerewolfItemList.pop())>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Sus") && _playChance>>
<<for _lo to 0; $PlayerData.length > _lo; _lo++>>
<<if $PlayerData[_lo][11][_CurPlay] + parseInt(State.variables[_CurPlayDeck][_card][7]["Sus"],10) < 0>>
<<set $PlayerData[_lo][11][_CurPlay] = 0>>
<<elseif $PlayerData[_lo][11][_CurPlay] != -1>>
<<set $PlayerData[_lo][11][_CurPlay] += parseInt(State.variables[_CurPlayDeck][_card][7]["Sus"],10)>>
<</if>>
<</for>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("InfectR")>>
<<set $RateOfInfection += parseInt(State.variables[_CurPlayDeck][_card][7]["InfectR"], 10)>>
<<if $RateOfInfection < 0>>
<<set $RateOfInfection to 0>>
<</if>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Infect")>>
<<set $CurrentInfectedPeople += parseInt(State.variables[_CurPlayDeck][_card][7]["Infect"], 10)>>
<<if $CurrentInfectedPeople < 0>>
<<set $CurrentInfectedPeople to 0>>
<</if>>
<</if>>
<</if>>
<<else>>
<<removeclass _cardID "handCardsSelected">>
<<script>>
/*The player playing the card cannot play said card */
Dialog.setup("Cannot Play Card");
Dialog.wiki("You do not have enough Physical or Spiritual Energy to play this card!");
Dialog.open();
<</script>>
<</if>>
<</if>>
<</for>>
<<set $SelectedCard to -2>>
<<redo "PlayerInfo">>
<</button>>
[[Next Turn|After Player Processing][State.variables[_CurPlayDeck].splice(0, 5)]]<<set $GameVersion to "1.0.0.03 - Most Basics Done">>
/*
Card Data:
-Card Image
-Card Text
-Target (-2 is self, -1 is anyone. Save who it is when chosen in this spot )
-Target Physical
-Target Spiritual
-Cost Physical
-Cost Spiritual
-Misc (Saved for speical stuff)
Deck Data:
-Card ID
Each deck comes with there own card bank of all the cards. The deck itself just refrences this bank
Player Data:
-(0) Player Name
-(1) Health
-(2) Physical
-(3) Spiritual
-(4) Infection (0 is human, 1-3 is Stage 1-3, 4 is Fully Infected, 5 is Orginal Werewolf)
-(5) Gain Physical
-(6) Gain Spiritual
-(7) Deck Type
-(8) Infected Deck Type
-(9) Werewolf Deck Type
-(10) Infection Items
-(11) Player Sus (-1 means thats them, 0 to soft 100, can go over 100. 100 means vote for said person)
Actual Decks:
--Naming convention
- Player + Deck Type + "Deck" (Player0 WW Deck)
- None is Human, I is Infected, WW is Orginal Werewolf
Image1.png
*/
<<set $HumanCardBank to [
["Pictures/G1SpiEnergy.png","Selected player gains 1 Spiritual Energy. Costs 1 Physical Energy",-1,0,1,1,0,{}],
["Pictures/G2SpiEnergy.png","Selected player gains 2 Spiritual Energy. Costs 1 Physical Energy",-1,0,2,1,0,{}],
["Pictures/G1PhyEnergy.png","Selected player gains 1 Physical Energy. Costs 1 Spiritual Energy",-1,1,0,0,1,{}],
["Pictures/G2PhyEnergy.png","Selected player gains 2 Physical Energy. Costs 1 Spiritual Energy",-1,2,0,0,1,{}],
["Pictures/G1SpiEnergy.png","Gain 1 Spiritual Energy. Costs 1 Physical Energy",-2,0,1,1,0,{}],
["Pictures/G2SpiEnergy.png","Gain 2 Spiritual Energy. Costs 1 Physical Energy",-2,0,2,1,0,{}],
["Pictures/G1PhyEnergy.png","Gain 1 Physical Energy. Costs 1 Spiritual Energy",-2,1,0,0,1,{}],
["Pictures/G2PhyEnergy.png","Gain 2 Physical Energy. Costs 1 Spiritual Energy",-2,2,0,0,1,{}],
["Pictures/H1Health.png","Heal 1 Health Point. Costs 3 Physical Energy and 5 Spiritual Energy", -2,0,0,3,5,{"Health":"1"}],
["Pictures/SmInvest.png","Small Investigation into who the Werewolf is. 25% chance to find a Werewolf Item. Costs 3 Physical Energy and 2 Spiritual Energy", -2,0,0,3,2,{"Chance":"25","Invest":"1","Sus":"-5"}],
["Pictures/BigInvest.png","Big Investigation into who the Werewolf is. 50% chance to find a Werewolf Item. Costs 4 Physical Energy and 4 Spiritual Energy", -2,0,0,4,4,{"Chance":"50","Invest":"1","Sus":"-5"}],
["Pictures/PreInvest.png","Precise Investigation into who the Werewolf is. 100% chance to find a Werewolf Item. Costs 8 Physical Energy and 5 Spiritual Energy", -1,0,0,8,5,{"Chance":"100","Invest":"1","Sus":"-5"}],
["Pictures/RG1SpiEnergy.png","Selected player losses 1 Spiritual Energy. Costs 1 Physical Energy",-1,0,-1,1,0,{}],
["Pictures/RG2SpiEnergy.png","Selected player losses 2 Spiritual Energy. Costs 1 Physical Energy",-1,0,-2,1,0,{}],
["Pictures/RG1PhyEnergy.png","Selected player losses 1 Physical Energy. Costs 1 Spiritual Energy",-1,-1,0,0,1,{}],
["Pictures/RG2PhyEnergy.png","Selected player losses 2 Physical Energy. Costs 1 Spiritual Energy",-1,-2,0,0,1,{}],
["Pictures/SR3Infect.png","Lower Infection rate by 3. Costs 3 Physical Energy and 5 Spiritual Energy",-2,0,0,3,5,{"InfectR":"-3"}],
]>>
<<set $InfectedCardBank to [
["ImageI1","TextI1",-1,2,0,1,0,[]],
["ImageI2","TextI2",-2,-1,-1,1,2,[]],
["ImageI3","TextI3",-1,0,1,1,0,[]],
["ImageI4","TextI4",-1,1,0,0,1,[]],
["ImageI5","TextI5",-1,2,2,0,0,[]]
]>>
<<set $WerewolfCardBank to [
["Pictures/G1SpiEnergy.png","Selected player gains 1 Spiritual Energy. Costs 1 Physical Energy",-1,0,1,1,0,{}],
["Pictures/G1PhyEnergy.png","Selected player gains 1 Physical Energy. Costs 1 Spiritual Energy",-1,1,0,0,1,{}],
["Pictures/G1SpiEnergy.png","Gain 1 Spiritual Energy. Costs 1 Physical Energy",-2,0,1,1,0,{}],
["Pictures/G2SpiEnergy.png","Gain 2 Spiritual Energy. Costs 1 Physical Energy",-2,0,2,1,0,{}],
["Pictures/G1PhyEnergy.png","Gain 1 Physical Energy. Costs 1 Spiritual Energy",-2,1,0,0,1,{}],
["Pictures/G2PhyEnergy.png","Gain 2 Physical Energy. Costs 1 Spiritual Energy",-2,2,0,0,1,{}],
["Pictures/H1Health.png","Heal 1 Health Point. Costs 3 Physical Energy and 5 Spiritual Energy", -2,0,0,3,5,{"Health":"1"}],
["Pictures/SmInvest.png","Small Investigation into who the Werewolf is. 25% chance to find a Werewolf Item. Costs 3 Physical Energy and 2 Spiritual Energy", -2,0,0,3,2,{"Chance":"25","Invest":"1","Sus":"-5"}],
["Pictures/BigInvest.png","Big Investigation into who the Werewolf is. 50% chance to find a Werewolf Item. Costs 4 Physical Energy and 4 Spiritual Energy", -1,0,0,4,4,{"Chance":"50","Invest":"1","Sus":"-5"}],
["Pictures/RG1SpiEnergy.png","Selected player losses 1 Spiritual Energy. Costs 1 Physical Energy",-1,0,-1,1,0,{}],
["Pictures/RG2SpiEnergy.png","Selected player losses 2 Spiritual Energy. Costs 1 Physical Energy",-1,0,-2,1,0,{}],
["Pictures/RG1PhyEnergy.png","Selected player losses 1 Physical Energy. Costs 1 Spiritual Energy",-1,-1,0,0,1,{}],
["Pictures/RG2PhyEnergy.png","Selected player losses 2 Physical Energy. Costs 1 Spiritual Energy",-1,-2,0,0,1,{}],
["Pictures/R1Health.png","Deal 1 Health Point in damage. Costs 3 Physical Energy and 2 Spiritual Energy", -1,0,0,3,2,{"Health":"1"}],
["Pictures/R2Health.png","Deal 2 Health Points in damage. Costs 5 Physical Energy and 3 Spiritual Energy", -1,0,0,5,3,{"Health":"2"}],
["Pictures/G3Sus.png","Selected player gains 3 Suspicion. Costs 2 Physical Energy and 2 Spiritual Energy",-1,0,0,2,2,{"Sus":"3"}],
["Pictures/G5Sus.png","Selected player gains 5 Suspicion. Costs 3 Physical Energy and 4 Spiritual Energy",-1,0,0,3,4,{"Sus":"5"}],
["Pictures/G10Sus.png","Selected player gains 10 Suspicion. Costs 5 Physical Energy and 9 Spiritual Energy",-1,0,0,5,9,{"Sus":"10"}],
["Pictures/SG1Infect.png","Raise Infection rate by 1. Costs 3 Physical Energy and 1 Spiritual Energy",-2,0,0,3,1,{"InfectR":"1"}],
["Pictures/SG3Infect.png","Raise Infection rate by 3. Costs 5 Physical Energy and 2 Spiritual Energy",-2,0,0,5,2,{"InfectR":"3"}],
["Pictures/SG5Infect.png","Raise Infection rate by 5. Costs 10 Physical Energy and 4 Spiritual Energy",-2,0,0,10,4,{"InfectR":"5"}],
]>>
/* All Template Playable Decks */
<<set $AllHumanDeck to [40,2,2,3,2,5,2,4,2,2,5,2,1,2,1,2,1,2]>>
<<set $AllInfectedDeck to [20,4,4,4,4,4]>>
<<set $AllWerewolfDeck to [40,3,3,4,1,5,3,2,2,1,2,2,2,2,1,1,1,1,1,1,1,1]>>
/* All Player 0 Playable Decks */
<<set $Player0Deck to []>>
<<set $Player0IDeck to []>>
<<set $Player0WWDeck to []>>
/* All Player 1 Playable Decks */
<<set $Player1Deck to []>>
<<set $Player1IDeck to []>>
<<set $Player1WWDeck to []>>
/* All Player 2 Playable Decks */
<<set $Player2Deck to []>>
<<set $Player2IDeck to []>>
<<set $Player2WWDeck to []>>
/* All Player 3 Playable Decks */
<<set $Player3Deck to []>>
<<set $Player3IDeck to []>>
<<set $Player3WWDeck to []>>
/* All Player 4 Playable Decks */
<<set $Player4Deck to []>>
<<set $Player4IDeck to []>>
<<set $Player4WWDeck to []>>
<<set $PlayerData to [
["Player",10,10,10,0,2,1,"HumanDeck","InfectedDeck","WerewolfDeck",["","","","","",""],[]],
["Stefanos",10,10,10,0,2,1,"HumanDeck","InfectedDeck","WerewolfDeck",[],[]],
["Stella",10,10,10,0,2,1,"HumanDeck","InfectedDeck","WerewolfDeck",[],[]],
["Vale",10,10,10,0,2,1,"HumanDeck","InfectedDeck","WerewolfDeck",[],[]],
["Cecilia",10,10,10,0,2,1,"HumanDeck","InfectedDeck","WerewolfDeck",[],[]]
]>>
<<set $TurnOrder to [0,1,2,3,4]>>
<<set $AllWerewolfItems to ["Apples","Bananas","Oranges","Grapes","Coconuts",
"Roses","Tulips","Carnations","Snowballs","Bluebells","Poppies","Dandelions",
"Sticks","Rocks","Leaves",
"Books","Glasses","Pearl Necklace",
"Rose Quartz Crystal","Turquoise Crystal","Quartz Crystal",
"Swiss Cheese","Cheddar Cheese", "Pepper Jack", "Provolone", " Gouda Cheese",
"Fur","Torn Shoes","Wolf Tooth","Torn Shirt","Wolf Tooth Necklace"]>>
<<set $FoundWerewolfItems to []>>
<<set $WerewolfItemList to []>>
<<set $WerewolfItemDupList to []>>
<<set $MaxPeople to 1000>>
<<set $CurrentInfectedPeople to 0>>
<<set $RateOfInfection to 1>>
<<set $IsPlayerWerewolf to false>>
<<set $IsFF to false>>
<<set $DayCount to 0>>
<<nobr>>
<<set $DayCount++>>
<<if $RateOfInfection < 1>>
<<set $RateOfInfection = 1>>
<</if>>
<<if $CurrentInfectedPeople + $RateOfInfection > $MaxPeople>>
<<set $CurrentInfectedPeople = $MaxPeople>>
<<else>>
<<set $CurrentInfectedPeople += $RateOfInfection>>
<<set _ranInfect to random(0,100)>>
<<if _ranInfect < 5>>
<<set $RateOfInfection += Math.floor(($CurrentInfectedPeople / $RateOfInfection ) /10)>>
<</if>>
<</if>>
<<for _y to 0; $TurnOrder.length > _y; _y++>>
<<set _CurPlay to $TurnOrder[_y]>>
<<set $PlayerData[_CurPlay][2] += $PlayerData[_CurPlay][5]>>
<<set $PlayerData[_CurPlay][3] += $PlayerData[_CurPlay][6]>>
<</for>>
<<set _curAlive to [1,1,1,1,1]>>
<<set _allVotes to [0,0,0,0,0]>>
<<redo "PlayerInfo">>
<<for _votingPlayer to 1; $PlayerData.length > _votingPlayer; _votingPlayer++>>
<<for _targetVotePlayer to 0; $PlayerData.length > _targetVotePlayer; _targetVotePlayer++>>
<<if $PlayerData[_votingPlayer][1] > 0>>
<<if $PlayerData[_votingPlayer][11][_targetVotePlayer] >= 100>>
<<if $PlayerData[_targetVotePlayer][1] > 0>>
<<set _allVotes[_targetVotePlayer]++>>
<<break>>
<</if>>
<</if>>
<<if $FoundWerewolfItems.includesAll($PlayerData[_targetVotePlayer][10])>>
<<if $PlayerData[_targetVotePlayer] != $PlayerData[_votingPlayer]>>
<<set _allVotes[_targetVotePlayer]++>>
<<break>>
<</if>>
<</if>>
<<else>>
<<set _curAlive[_votingPlayer] to 0>>
<</if>>
<</for>>
<</for>><</nobr>>Votes:
$PlayerData[0][0] _allVotes[0]
$PlayerData[1][0] _allVotes[1]
$PlayerData[2][0] _allVotes[2]
$PlayerData[3][0] _allVotes[3]
$PlayerData[4][0] _allVotes[4]
<<nobr>><<set $SelectedCard to -1>>
<<set _ConfirmSus to false>>
<<set _SelectedSus to -3>>
<<set _canVote to true>>
<script>
function SelectCards(card){
var prev = SugarCube.State.variables.SelectedCard;
if(card.classList.contains("handCardsUsed")) {
return;
} else if (prev == -1){
card.classList.add("handCardsSelected");
} else if( ("Card" + prev) == card.id){
return;
} else if (prev == -2){
card.classList.add("handCardsSelected");
} else if (prev == -3){
return;
}
else {
document.getElementById(("Card" + prev)).classList.remove("handCardsSelected");
card.classList.add("handCardsSelected");
}
if(card.id == "Card1"){
SugarCube.State.variables.SelectedCard = 1;
} else if(card.id == "Card2"){
SugarCube.State.variables.SelectedCard = 2;
} else if(card.id == "Card3"){
SugarCube.State.variables.SelectedCard = 3;
} else if(card.id == "Card4"){
SugarCube.State.variables.SelectedCard = 4;
} else{
SugarCube.State.variables.SelectedCard = 5;
}
}
</script><</nobr>>
Pick who you want to vote as the werewolf:
<<nobr>><div id="Hand">
<div class="handCards" id="Card1" onclick="SelectCards(this);">
/*<div class="crdImg">$PlayerZeroDeck[0][0]</div>*/
<div class="crdText bigText centeredText">No One</div>
</div>
<div class="handCards" id="Card2" onclick="SelectCards(this);">
/*<div class="crdImg">$PlayerZeroDeck[1][0]</div>*/
<div class="crdText bigText centeredText">$PlayerData[1][0]</div>
</div>
<div class="handCards" id="Card3" onclick="SelectCards(this);">
/*<div class="crdImg">$PlayerZeroDeck[2][0] </div>*/
<div class="crdText bigText centeredText">$PlayerData[2][0]</div>
</div>
<div class="handCards" id="Card4" onclick="SelectCards(this);">
/*<div class="crdImg">$PlayerZeroDeck[3][0]</div>*/
<div class="crdText bigText centeredText">$PlayerData[3][0]</div>
</div>
<div class="handCards" id="Card5" onclick="SelectCards(this);">
/* <div class="crdImg">$PlayerZeroDeck[4][0]</div>*/
<div class="crdText bigText centeredText">$PlayerData[4][0]</div>
</div>
</div>
<<done>>
<<if $PlayerData[1][1] <= 0>>
<<addclass "#Card2" "handCardsUsed">>
<</if>>
<<if $PlayerData[2][1] <= 0>>
<<addclass "#Card3" "handCardsUsed">>
<</if>>
<<if $PlayerData[3][1] <= 0>>
<<addclass "#Card4" "handCardsUsed">>
<</if>>
<<if $PlayerData[4][1] <= 0>>
<<addclass "#Card5" "handCardsUsed">>
<</if>>
<</done>><</nobr>><<nobr>>
<<if _canVote>>
<<button "Submit">><<set _ConfirmSus to true>><<redo "ConfirmSus">><</button>>
<<do tag "ConfirmSus">>
<<if _ConfirmSus is true>>
<<set _SelectedSus to $SelectedCard>>
<<set $SelectedCard to -3>><br>
<<print "Are you sure about your pick?">><br>
<<button "Yes I Am">><<set _allVotes[_SelectedSus-1]++>> <<redo "Votes">><</button>><br>
<<button "No Im Not">><<set _ConfirmSus to false>><<set $SelectedCard to _SelectedSus>><<redo "ConfirmSus">><</button>>
<</if>>
<</do>>
<</if>><br>
<<do tag "Votes">>
<<if _SelectedSus-1 == 0>>
<<set _allVotes[0]-->>
<</if>>
<<if $CurrentInfectedPeople >= $MaxPeople>>
<<if $PlayerData[0][4] == 5>>
[[The town is fully infected|Player Werewolf Infection Win End]]
<<set _canVote to false>>
<<else>>
[[The town is fully infected|Player Human Infection Loss End]]
<<set _canVote to false>>
<</if>>
<<elseif _allVotes[0] >= (Math.trunc(_curAlive.count("1") / 2) + 1)>>
<<if $PlayerData[0][4] == 5>>
[[You have been voted out|Player Werewolf Loss End]]
<<set _canVote to false>>
<<else>>
[[You have been voted out|Player Human Loss End]]
<<set _canVote to false>>
<</if>>
<<elseif _allVotes[1] >= (Math.trunc(_curAlive.count("1") / 2) + 1)>>
$PlayerData[1][0] has been voted out!
<<set $PlayerData[1][1] to -1>>
<<if $PlayerData[1][4] == 5>>
[[Maybe they were the werewolf?|Player Voted Werewolf Win]]
<<set _canVote to false>>
<<else>>
[[Maybe they were the werewolf?|Before Player Processing]]
<<set _canVote to false>>
<</if>>
<<elseif _allVotes[2] >= (Math.trunc(_curAlive.count("1") / 2) + 1)>>
$PlayerData[2][0] has been voted out!
<<set $PlayerData[2][1] to -1>>
<<if $PlayerData[2][4] == 5>>
[[Maybe they were the werewolf?|Player Voted Werewolf Win]]
<<set _canVote to false>>
<<else>>
[[Maybe they were the werewolf?|Before Player Processing]]
<<set _canVote to false>>
<</if>>
<<elseif _allVotes[3] >= (Math.trunc(_curAlive.count("1") / 2) + 1)>>
$PlayerData[3][0] has been voted out!
<<set $PlayerData[3][1] to -1>>
<<if $PlayerData[3][4] == 5>>
[[Maybe they were the werewolf?|Player Voted Werewolf Win]]
<<set _canVote to false>>
<<else>>
[[Maybe they were the werewolf?|Before Player Processing]]
<<set _canVote to false>>
<</if>>
<<elseif _allVotes[4] >= (Math.trunc(_curAlive.count("1") / 2) + 1)>>
$PlayerData[4][0] has been voted out!
<<set $PlayerData[4][1] to -1>>
<<if $PlayerData[4][4] == 5>>
[[Maybe they were the werewolf?|Player Voted Werewolf Win]]
<<set _canVote to false>>
<<else>>
[[Maybe they were the werewolf?|Before Player Processing]]
<<set _canVote to false>>
<</if>>
<<elseif _ConfirmSus>>
[[No one gets voted out, for now.|Before Player Processing]]
<</if>>
<</do>>
<</nobr>>
<<nobr>>
<<do tag "SuffleCards">>
<<if $Player0WWDeck.length == 0>>
<<set _wkAllWerewolfDeck to clone($AllWerewolfDeck)>>
<<for _i to 0; $AllWerewolfDeck[0] > _i; _i++>>
<<set _check to 1>>
<<for _check == 1>>
<<set _ran to random(1,5)>>
<<if _wkAllWerewolfDeck[_ran] > 0>>
<<set _check to 0>>
<<set $Player0WWDeck.push($WerewolfCardBank[(_ran - 1)])>>
<<set _wkAllWerewolfDeck[_ran]-->>
<</if>>
<</for>>
<</for>>
<</if>>
<</do>>
<</nobr>>
[[Next Turn|Night (Player WW)][$Player0WWDeck.splice(0, 5)]]
<<set $SelectedCard to -1>>
<<do tag "PlayerInfo">>
$PlayerData[0][0]
$PlayerData[0][2]
$PlayerData[0][3]
$PlayerData[1][0]
$PlayerData[1][2]
$PlayerData[1][3]
$PlayerData[2][0]
$PlayerData[2][2]
$PlayerData[2][3]
$PlayerData[3][0]
$PlayerData[3][2]
$PlayerData[3][3]
$PlayerData[4][0]
$PlayerData[4][2]
$PlayerData[4][3]
<</do>>
<script>
function SelectCards(card){
var prev = SugarCube.State.variables.SelectedCard;
if (prev == -1){
card.classList.add("handCardsSelected");
} else if( ("Card" + prev) == card.id){
return;
} else if(card.classList.contains("handCardsUsed")){
return;
} else if (prev == -2){
card.classList.add("handCardsSelected");
}
else {
document.getElementById(("Card" + prev)).classList.remove("handCardsSelected");
card.classList.add("handCardsSelected");
}
if(card.id == "Card1"){
SugarCube.State.variables.SelectedCard = 1;
} else if(card.id == "Card2"){
SugarCube.State.variables.SelectedCard = 2;
} else if(card.id == "Card3"){
SugarCube.State.variables.SelectedCard = 3;
} else if(card.id == "Card4"){
SugarCube.State.variables.SelectedCard = 4;
} else{
SugarCube.State.variables.SelectedCard = 5;
}
}
</script>
Select Player:
<<listbox "$SelectPlayer" autoselect>>
<<option $PlayerData[0][0] 0>>
<<option $PlayerData[1][0] 1>>
<<option $PlayerData[2][0] 2>>
<<option $PlayerData[3][0] 3>>
<<option $PlayerData[4][0] 4>>
<</listbox>>
Deck:
<<nobr>>
<div id="Hand">
<div class="handCards" id="Card1" onclick="SelectCards(this);">
<div class="crdImg">$Player0WWDeck[0][0]</div>
<div class="crdText">$Player0WWDeck[0][1]</div>
</div>
<div class="handCards" id="Card2" onclick="SelectCards(this);">
<div class="crdImg">$Player0WWDeck[1][0]</div>
<div class="crdText">$Player0WWDeck[1][1]</div>
</div>
<div class="handCards" id="Card3" onclick="SelectCards(this);">
<div class="crdImg">$Player0WWDeck[2][0] </div>
<div class="crdText">$Player0WWDeck[2][1]</div>
</div>
<div class="handCards" id="Card4" onclick="SelectCards(this);">
<div class="crdImg">$Player0WWDeck[3][0]</div>
<div class="crdText">$Player0WWDeck[3][1]</div>
</div>
<div class="handCards" id="Card5" onclick="SelectCards(this);">
<div class="crdImg">$Player0WWDeck[4][0]</div>
<div class="crdText">$Player0WWDeck[4][1]</div>
</div>
</div>
<</nobr>>
<<button "Use Card">>
/* Do stuff from the card */
<<if $SelectedCard is 1>>
<<removeclass "#Card1" "handCardsSelected">>
<<addclass "#Card1" "handCardsUsed">>
<<if $Player0WWDeck[0][2] is -1>>
<<set $PlayerData[0][2] -= $Player0WWDeck[0][5]>>
<<set $PlayerData[0][3] -= $Player0WWDeck[0][6]>>
<<set $PlayerData[$SelectPlayer][2] += $Player0WWDeck[0][3]>>
<<set $PlayerData[$SelectPlayer][3] += $Player0WWDeck[0][4]>>
<<else>>
<<set $PlayerData[0][2] -= $Player0WWDeck[0][5]>>
<<set $PlayerData[0][3] -= $Player0WWDeck[0][6]>>
<<set $PlayerData[0][2] += $Player0WWDeck[0][3]>>
<<set $PlayerData[0][3] += $Player0WWDeck[0][4]>>
<</if>>
<<elseif $SelectedCard is 2>>
<<removeclass "#Card2" "handCardsSelected">>
<<addclass "#Card2" "handCardsUsed">>
<<if $Player0WWDeck[1][2] is -1>>
<<set $PlayerData[0][2] -= $Player0WWDeck[1][5]>>
<<set $PlayerData[0][3] -= $Player0WWDeck[1][6]>>
<<set $PlayerData[$SelectPlayer][2] += $Player0WWDeck[1][3]>>
<<set $PlayerData[$SelectPlayer][3] += $Player0WWDeck[1][4]>>
<<else>>
<<set $PlayerData[0][2] -= $Player0WWDeck[1][5]>>
<<set $PlayerData[0][3] -= $Player0WWDeck[1][6]>>
<<set $PlayerData[0][2] += $Player0WWDeck[1][3]>>
<<set $PlayerData[0][3] += $Player0WWDeck[1][4]>>
<</if>>
<<elseif $SelectedCard is 3>>
<<removeclass "#Card3" "handCardsSelected">>
<<addclass "#Card3" "handCardsUsed">>
<<if $Player0WWDeck[2][2] is -1>>
<<set $PlayerData[0][2] -= $Player0WWDeck[2][5]>>
<<set $PlayerData[0][3] -= $Player0WWDeck[2][6]>>
<<set $PlayerData[$SelectPlayer][2] += $Player0WWDeck[2][3]>>
<<set $PlayerData[$SelectPlayer][3] += $Player0WWDeck[2][4]>>
<<else>>
<<set $PlayerData[0][2] -= $Player0WWDeck[2][5]>>
<<set $PlayerData[0][3] -= $Player0WWDeck[2][6]>>
<<set $PlayerData[0][2] += $Player0WWDeck[2][3]>>
<<set $PlayerData[0][3] += $Player0WWDeck[2][4]>>
<</if>>
<<elseif $SelectedCard is 4>>
<<removeclass "#Card4" "handCardsSelected">>
<<addclass "#Card4" "handCardsUsed">>
<<if $Player0WWDeck[3][2] is -1>>
<<set $PlayerData[0][2] -= $Player0WWDeck[3][5]>>
<<set $PlayerData[0][3] -= $Player0WWDeck[3][6]>>
<<set $PlayerData[$SelectPlayer][2] += $Player0WWDeck[3][3]>>
<<set $PlayerData[$SelectPlayer][3] += $Player0WWDeck[3][4]>>
<<else>>
<<set $PlayerData[0][2] -= $Player0WWDeck[3][5]>>
<<set $PlayerData[0][3] -= $Player0WWDeck[3][6]>>
<<set $PlayerData[0][2] += $Player0WWDeck[3][3]>>
<<set $PlayerData[0][3] += $Player0WWDeck[3][4]>>
<</if>>
<<elseif $SelectedCard is 5>>
<<removeclass "#Card5" "handCardsSelected">>
<<addclass "#Card5" "handCardsUsed">>
<<if $Player0WWDeck[4][2] is -1>>
<<set $PlayerData[0][2] -= $Player0WWDeck[4][5]>>
<<set $PlayerData[0][3] -= $Player0WWDeck[4][6]>>
<<set $PlayerData[$SelectPlayer][2] += $Player0WWDeck[4][3]>>
<<set $PlayerData[$SelectPlayer][3] += $Player0WWDeck[4][4]>>
<<else>>
<<set $PlayerData[0][2] -= $Player0WWDeck[4][5]>>
<<set $PlayerData[0][3] -= $Player0WWDeck[4][6]>>
<<set $PlayerData[0][2] += $Player0WWDeck[4][3]>>
<<set $PlayerData[0][3] += $Player0WWDeck[4][4]>>
<</if>>
<</if>>
<<set $SelectedCard to -2>>
<<redo "PlayerInfo">>
<</button>>
<<button "Submit">><<redo "info">><</button>>
<<do tag "info">><<print $SelectedCard>><<print $SelectPlayer>><</do>><<nobr>>
<<for _i to 0; $TurnOrder.length > _i; _i++>>
<<if $TurnOrder[_i] == 0>>
<<break>>
<</if>>
<<set _CurPlay to $TurnOrder[_i]>>
<<if $PlayerData[_CurPlay][4] == 5>>
<<set _CurPlayDeck to ("Player" + _CurPlay + "WWDeck")>>
<<set _Type to "Werewolf">>
<<elseif $PlayerData[_CurPlay][4] == 0>>
<<set _CurPlayDeck to ("Player" + _CurPlay + "Deck")>>
<<set _Type to "Human">>
<<else>>
<<set _CurPlayDeck to ("Player" + _CurPlay + "IDeck")>>
<<set _Type to "Infected">>
<</if>>
/* State.variables[_CurPlayDeck] */
/* State.variables[("All" + _Type + "Deck")] */
<<if State.variables[_CurPlayDeck].length == 0>>
<<set _wkDeck to clone(State.variables[("All" + _Type + "Deck")])>>
<<for _x to 0; State.variables[("All" + _Type + "Deck")][0] > _x; _x++>>
<<set _check to 1>>
<<for _check == 1>>
<<set _ran to random(1,State.variables[("All" + _Type + "Deck")][0])>>
<<if _wkDeck[_ran] > 0>>
<<set _check to 0>>
<<set State.variables[_CurPlayDeck].push(State.variables[(_Type + "CardBank")][(_ran - 1)])>>
<<set _wkDeck[_ran]-->>
<</if>>
<</for>>
<</for>>
<</if>>
<<set _canPlay to true>>
<<set _playedCards to [0,0,0,0,0]>>
<<if $PlayerData[_CurPlay][1] <= -1>>
<<set _canPlay to false>>
<</if>>
<<for _canPlay>>
<<set _hasPlayedCard to false>>
<<set _selectPlayer to random(0,($PlayerData.length - 1))>>
/* Loop thu cards and find the card selected. Then do stuff with it. */
<<for _iCard to 1; (5 + 1) > _iCard; _iCard++>>
<<set _card to (_iCard-1)>>
<<if _playedCards[_card] != 1>>
/* checks to see if player playing the card can actualy play it */
<<if $PlayerData[_CurPlay][2] - State.variables[_CurPlayDeck][_card][5] >= 0 && $PlayerData[_CurPlay][3] - State.variables[_CurPlayDeck][_card][6] >= 0>>
/* If the cards target is anyone */
<<if State.variables[_CurPlayDeck][_card][2] is -1>>
/*remove cost from player who played it */
<<set $PlayerData[_CurPlay][2] -= State.variables[_CurPlayDeck][_card][5]>>
<<set $PlayerData[_CurPlay][3] -= State.variables[_CurPlayDeck][_card][6]>>
/*remove energy from target player */
<<set $PlayerData[$SelectPlayer][2] += State.variables[_CurPlayDeck][_card][3]>>
<<set $PlayerData[$SelectPlayer][3] += State.variables[_CurPlayDeck][_card][4]>>
<<set _playChance to true>>
/*check to see if card has a chance to do something special.
If the card does not have it, it will work 100% of the time.
If the card does have it, it will work so long as the rand num is under the given chance num. */
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Chance")>>
<<set _ranChance to random(0,100)>>
<<if _ranChance > parseInt(State.variables[_CurPlayDeck][_card][7]["Chance"],10)>>
<<set _playChance to false>>
<</if>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Health") && _playChance>>
<<set $PlayerData[$SelectPlayer][1] += parseInt(State.variables[_CurPlayDeck][_card][7]["Health"], 10)>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Invest") && _playChance>>
<<set $FoundWerewolfItems.push($WerewolfItemList.pop())>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Sus") && _playChance>>
<<for _lo to 0; $PlayerData.length > _lo; _lo++>>
<<if $PlayerData[_lo][11][$SelectPlayer] + parseInt(State.variables[_CurPlayDeck][_card][7]["Sus"],10) < 0>>
<<set $PlayerData[_lo][11][$SelectPlayer] = 0>>
<<elseif $PlayerData[_lo][11][$SelectPlayer] != -1>>
<<set $PlayerData[_lo][11][$SelectPlayer] += parseInt(State.variables[_CurPlayDeck][_card][7]["Sus"],10)>>
<</if>>
<</for>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("InfectR") && _playChance>>
<<set $RateOfInfection += parseInt(State.variables[_CurPlayDeck][_card][7]["InfectR"], 10)>>
<<if $RateOfInfection < 0>>
<<set $RateOfInfection to 0>>
<</if>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Infect") && _playChance>>
<<set $CurrentInfectedPeople += parseInt(State.variables[_CurPlayDeck][_card][7]["Infect"], 10)>>
<<if $CurrentInfectedPeople < 0>>
<<set $CurrentInfectedPeople to 0>>
<</if>>
<</if>>
/* The card must be targeting whoever played it */
<<else>>
<<set $PlayerData[_CurPlay][2] -= State.variables[_CurPlayDeck][_card][5]>>
<<set $PlayerData[_CurPlay][3] -= State.variables[_CurPlayDeck][_card][6]>>
<<set $PlayerData[_CurPlay][2] += State.variables[_CurPlayDeck][_card][3]>>
<<set $PlayerData[_CurPlay][3] += State.variables[_CurPlayDeck][_card][4]>>
<<set _playChance to true>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Chance")>>
<<set _ranChance to random(0,100)>>
<<if _ranChance > parseInt(State.variables[_CurPlayDeck][_iCard][7]["Chance"],10)>>
<<set _playChance to false>>
<</if>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Health")>>
<<set $PlayerData[_CurPlay][1] += parseInt(State.variables[_CurPlayDeck][_card][7]["Health"], 10)>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Invest") && _playChance>>
<<set $FoundWerewolfItems.push($WerewolfItemList.pop())>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Sus") && _playChance>>
<<for _lo to 0; $PlayerData.length > _lo; _lo++>>
<<if $PlayerData[_lo][11][_CurPlay] + parseInt(State.variables[_CurPlayDeck][_card][7]["Sus"],10) < 0>>
<<set $PlayerData[_lo][11][_CurPlay] = 0>>
<<elseif $PlayerData[_lo][11][_CurPlay] != -1>>
<<set $PlayerData[_lo][11][_CurPlay] += parseInt(State.variables[_CurPlayDeck][_card][7]["Sus"],10)>>
<</if>>
<</for>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("InfectR")>>
<<set $RateOfInfection += parseInt(State.variables[_CurPlayDeck][_card][7]["InfectR"], 10)>>
<<if $RateOfInfection < 0>>
<<set $RateOfInfection to 0>>
<</if>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Infect")>>
<<set $CurrentInfectedPeople += parseInt(State.variables[_CurPlayDeck][_card][7]["Infect"], 10)>>
<<if $CurrentInfectedPeople < 0>>
<<set $CurrentInfectedPeople to 0>>
<</if>>
<</if>>
<<set _playedCards[_card] to 1>>
<<set _hasPlayedCard to true>>
<</if>>
<</if>>
<</if>>
<</for>>
<<if _hasPlayedCard is false>>
<<set _canPlay to false>>
<<set State.variables[_CurPlayDeck] to State.variables[_CurPlayDeck].splice(0, 5)>>
<</if>>
<</for>>
<</for>>
[[Your Turn|Main Game]]
<<done>><<redo "PlayerInfo">><</done>>
<</nobr>><<nobr>>
<<set _pastPlayer to false>>
<<for _i to 0; $TurnOrder.length > _i; _i++>>
<<if _pastPlayer is false>>
<<if $TurnOrder[_i] == 0>>
<<set _pastPlayer to true>>
<<continue>>
<<else>>
<<continue>>
<</if>>
<</if>>
<<set _CurPlay to $TurnOrder[_i]>>
<<if $PlayerData[_CurPlay][4] == 5>>
<<set _CurPlayDeck to ("Player" + _CurPlay + "WWDeck")>>
<<set _Type to "Werewolf">>
<<elseif $PlayerData[_CurPlay][4] == 0>>
<<set _CurPlayDeck to ("Player" + _CurPlay + "Deck")>>
<<set _Type to "Human">>
<<else>>
<<set _CurPlayDeck to ("Player" + _CurPlay + "IDeck")>>
<<set _Type to "Infected">>
<</if>>
<<if State.variables[_CurPlayDeck].length == 0>>
<<set _wkDeck to clone(State.variables[("All" + _Type + "Deck")])>>
<<for _x to 0; State.variables[("All" + _Type + "Deck")][0] > _x; _x++>>
<<set _check to 1>>
<<for _check == 1>>
<<set _ran to random(1,State.variables[("All" + _Type + "Deck")][0])>>
<<if _wkDeck[_ran] > 0>>
<<set _check to 0>>
<<set State.variables[_CurPlayDeck].push(State.variables[(_Type + "CardBank")][(_ran - 1)])>>
<<set _wkDeck[_ran]-->>
<</if>>
<</for>>
<</for>>
<</if>>
<<set _canPlay to true>>
<<set _playedCards to [0,0,0,0,0]>>
<<if $PlayerData[_CurPlay][1] <= -1>>
<<set _canPlay to false>>
<</if>>
<<for _canPlay>>
<<set _hasPlayedCard to false>>
<<set _selectPlayer to random(0,($PlayerData.length - 1))>>
/* Loop thu cards and find the card selected. Then do stuff with it. */
<<for _iCard to 1; (5 + 1) > _iCard; _iCard++>>
<<set _card to (_iCard-1)>>
<<if _playedCards[_card] != 1>>
/* checks to see if player playing the card can actualy play it */
<<if $PlayerData[_CurPlay][2] - State.variables[_CurPlayDeck][_card][5] >= 0 && $PlayerData[_CurPlay][3] - State.variables[_CurPlayDeck][_card][6] >= 0>>
/* If the cards target is anyone */
<<if State.variables[_CurPlayDeck][_card][2] is -1>>
/*remove cost from player who played it */
<<set $PlayerData[_CurPlay][2] -= State.variables[_CurPlayDeck][_card][5]>>
<<set $PlayerData[_CurPlay][3] -= State.variables[_CurPlayDeck][_card][6]>>
/*remove energy from target player */
<<set $PlayerData[$SelectPlayer][2] += State.variables[_CurPlayDeck][_card][3]>>
<<set $PlayerData[$SelectPlayer][3] += State.variables[_CurPlayDeck][_card][4]>>
<<set _playChance to true>>
/*check to see if card has a chance to do something special.
If the card does not have it, it will work 100% of the time.
If the card does have it, it will work so long as the rand num is under the given chance num. */
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Chance")>>
<<set _ranChance to random(0,100)>>
<<if _ranChance > parseInt(State.variables[_CurPlayDeck][_card][7]["Chance"],10)>>
<<set _playChance to false>>
<</if>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Health") && _playChance>>
<<set $PlayerData[$SelectPlayer][1] += parseInt(State.variables[_CurPlayDeck][_card][7]["Health"], 10)>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Invest") && _playChance>>
<<set $FoundWerewolfItems.push($WerewolfItemList.pop())>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Sus") && _playChance>>
<<for _lo to 0; $PlayerData.length > _lo; _lo++>>
<<if $PlayerData[_lo][11][$SelectPlayer] + parseInt(State.variables[_CurPlayDeck][_card][7]["Sus"],10) < 0>>
<<set $PlayerData[_lo][11][$SelectPlayer] = 0>>
<<elseif $PlayerData[_lo][11][$SelectPlayer] != -1>>
<<set $PlayerData[_lo][11][$SelectPlayer] += parseInt(State.variables[_CurPlayDeck][_card][7]["Sus"],10)>>
<</if>>
<</for>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("InfectR") && _playChance>>
<<set $RateOfInfection += parseInt(State.variables[_CurPlayDeck][_card][7]["InfectR"], 10)>>
<<if $RateOfInfection < 0>>
<<set $RateOfInfection to 0>>
<</if>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Infect") && _playChance>>
<<set $CurrentInfectedPeople += parseInt(State.variables[_CurPlayDeck][_card][7]["Infect"], 10)>>
<<if $CurrentInfectedPeople < 0>>
<<set $CurrentInfectedPeople to 0>>
<</if>>
<</if>>
/* The card must be targeting whoever played it */
<<else>>
<<set $PlayerData[_CurPlay][2] -= State.variables[_CurPlayDeck][_card][5]>>
<<set $PlayerData[_CurPlay][3] -= State.variables[_CurPlayDeck][_card][6]>>
<<set $PlayerData[_CurPlay][2] += State.variables[_CurPlayDeck][_card][3]>>
<<set $PlayerData[_CurPlay][3] += State.variables[_CurPlayDeck][_card][4]>>
<<set _playChance to true>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Chance")>>
<<set _ranChance to random(0,100)>>
<<if _ranChance > parseInt(State.variables[_CurPlayDeck][_iCard][7]["Chance"],10)>>
<<set _playChance to false>>
<</if>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Health")>>
<<set $PlayerData[_CurPlay][1] += parseInt(State.variables[_CurPlayDeck][_card][7]["Health"], 10)>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Invest") && _playChance>>
<<set $FoundWerewolfItems.push($WerewolfItemList.pop())>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Sus") && _playChance>>
<<for _lo to 0; $PlayerData.length > _lo; _lo++>>
<<if $PlayerData[_lo][11][_CurPlay] + parseInt(State.variables[_CurPlayDeck][_card][7]["Sus"],10) < 0>>
<<set $PlayerData[_lo][11][_CurPlay] = 0>>
<<elseif $PlayerData[_lo][11][_CurPlay] != -1>>
<<set $PlayerData[_lo][11][_CurPlay] += parseInt(State.variables[_CurPlayDeck][_card][7]["Sus"],10)>>
<</if>>
<</for>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("InfectR")>>
<<set $RateOfInfection += parseInt(State.variables[_CurPlayDeck][_card][7]["InfectR"], 10)>>
<<if $RateOfInfection < 0>>
<<set $RateOfInfection to 0>>
<</if>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Infect")>>
<<set $CurrentInfectedPeople += parseInt(State.variables[_CurPlayDeck][_card][7]["Infect"], 10)>>
<<if $CurrentInfectedPeople < 0>>
<<set $CurrentInfectedPeople to 0>>
<</if>>
<</if>>
<<set _playedCards[_card] to 1>>
<<set _hasPlayedCard to true>>
<</if>>
<</if>>
<</if>>
<</for>>
<<if _hasPlayedCard is false>>
<<set _canPlay to false>>
<<set State.variables[_CurPlayDeck] to State.variables[_CurPlayDeck].splice(0, 5)>>
<</if>>
<</for>>
<</for>>
<<set _tempTurn to $TurnOrder.shift()>>
<<set $TurnOrder.push(_tempTurn)>>
<</nobr>>
[[Dawn of a new day|Day]]
<<done>><<redo "PlayerInfo">><</done>>It was just like any other night as you were walking home. Though it was getting close to Halloween, the one holiday you tend to like the most. Part of you just loves the idea of wearing costumes and playing these mostly fantasy characters.
Like werewolves, the strong, big beasts of legends. One of the mainstays in monster media, whether that's games, art, or even stories. For this year, you intend to dress up as one of these mythical creatures for a quite popular Halloween party. Normally you don't go to these things since, you know, people and interactions. But you just need to show off your cool werewolf costume that you not only made most of, but also put quite an expensive amount of money and time into it.
Though one of the most important and expensive items you got for it was an authentic werewolf ring. It wasn't found online, no way. You had to hear it from word of mouth from word of mouth. Months of searching for it and getting the funds to buy it.
The old woman who sold it to you said that it's cursed. Of course it is! Its a werewolf ring. You know, the "bad guys" all the werewolf hunters hunt them, and the villagers run away in fear. You didn't even hear, nor remember all the warnings she gave. Though for some reason you really did like wearing it all the time?
----
It was right then, as you were walking late at night, that it happened. The ring started to glow a bright red. The glow slowly covered your whole body until you just... blacked out...
[[It seems like your waking up|Game Explination]] Pick Your Six Werewolf Items:
<<for _i to 1; $PlayerData.length > _i; _i++>>
<<for _Items to 0; 6 > _items; _items++>>
<<set _ran to random(0,$AllInfectionItems.length)>>
<<print $AllInfectionItems>>
<</for>>
<</for>>
<<print $PlayerData[1][10]>><<nobr>>
<<if $IsPlayerWerewolf>>
<<set $PlayerData[0][4] = 5>>
<<else>>
<<set _ranWW to random(0,4)>>
<<set $PlayerData[_ranWW][4] = 5>>
<</if>>
<<for _setup to 0; $PlayerData.length > _setup; _setup++>>
<<for _setup1 to 0; $PlayerData.length > _setup1; _setup1++>>
<<if _setup1 == _setup>>
<<set $PlayerData[_setup][11].push(-1)>>
<<else>>
<<set $PlayerData[_setup][11].push(0)>>
<</if>>
<</for>>
<</for>>
<</nobr>>
WARNING!
You can pick 6 of the same items. However, the CPU AI will automatically vote you out if they find just one of those items. The same goes for if you pick 5 of the same (That one different one, and one of the same), 4 (The two different ones, and one of the same), etc.
Pick Your Six Werewolf Items:
<<listbox "$PlayerData[0][10][0]" autoselect>>
<<optionsfrom $AllWerewolfItems>>
<</listbox>>
<<listbox "$PlayerData[0][10][1]" autoselect>>
<<optionsfrom $AllWerewolfItems>>
<</listbox>>
<<listbox "$PlayerData[0][10][2]" autoselect>>
<<optionsfrom $AllWerewolfItems>>
<</listbox>>
<<listbox "$PlayerData[0][10][3]" autoselect>>
<<optionsfrom $AllWerewolfItems>>
<</listbox>>
<<listbox "$PlayerData[0][10][4]" autoselect>>
<<optionsfrom $AllWerewolfItems>>
<</listbox>>
<<listbox "$PlayerData[0][10][5]" autoselect>>
<<optionsfrom $AllWerewolfItems>>
<</listbox>>
<<link "Infection List" "Day">>
<<set _tempAllWerewolfItems to clone($AllWerewolfItems)>>
<<for _lookPlay to 0; $PlayerData[0][10].length > _lookPlay; _lookPlay++>>
<<set _blah to _tempAllWerewolfItems.deleteAll($PlayerData[0][10][_lookPlay])>>
<</for>>
<<for _i to 1; $PlayerData.length > _i; _i++>>
<<for _items to 0; 6 > _items; _items++>>
<<set $PlayerData[_i][10].push(_tempAllWerewolfItems.random())>>
<<set _blah to _tempAllWerewolfItems.deleteAll($PlayerData[_i][10][_items])>>
<</for>>
<</for>>
<<for _up to 0; $PlayerData.length > _up; _up++>>
<<if $PlayerData[_up][4] is 5>>
<<set $WerewolfItemList to $WerewolfItemList.concat($PlayerData[_up][10])>>
<<else>>
<<set _tempVar to clone($PlayerData[_up][10])>>
<<set _tempVar.pluck()>>
<<set $WerewolfItemList to $WerewolfItemList.concat(_tempVar)>>
<</if>>
<</for>>
<<set $WerewolfItemList.shuffle()>><</link>>Found Items: $FoundWerewolfItems
<<nobr>>
<<for _i to 0; $PlayerData.length > _i; _i++>>
<<set _tempFoundWerewolfItems to clone($FoundWerewolfItems)>>
$PlayerData[_i][0]:
<<set _AllUItems to clone($AllWerewolfItems)>>
<<for _iPlayer to 0; $PlayerData[_i][10].length > _iPlayer; _iPlayer++>>
<<set _notFound to true>>
<<for _iTemp to 0; _tempFoundWerewolfItems.length > _iTemp; _iTemp++>>
<<if _tempFoundWerewolfItems[_iTemp] == $PlayerData[_i][10][_iPlayer]>>
<<if $WerewolfItemDupList.includes($PlayerData[_i][10][_iPlayer])>>
<span class="foundDupWerewolfItem">$PlayerData[_i][10][_iPlayer]</span><<print ",">>
<<else>>
<span class="foundWerewolfItem">$PlayerData[_i][10][_iPlayer]</span><<print ",">>
<</if>>
<<set _tempFoundWerewolfItems[_iTemp] to "">>
<<set _notFound to false>>
<<break>>
<</if>>
<</for>>
<<if _notFound>>
$PlayerData[_i][10][_iPlayer],
<</if>>
<</for>>
<br>
<</for>>
<</nobr>>
<<button "Submit">><<redo "makePlayer">><</button>>
<<do tag "makePlayer">>
<<if $PlayerData[0][10].toUnique().length != $PlayerData[0][10].length>>
<<print "Please make sure all items are unique!">>
<<else>>
<<print "All items are unique!">>
<</if>>
<</do>>
<<set $HumanCardBank to [
["Image1.png","Text1",-1,2,0,1,0,[]],
["Image2.png","Text2",-2,-1,-1,1,2,[]],
["Image3.png","Text3",-1,0,1,1,0,[]],
["Image4.png","Text4",-1,1,0,0,1,[]],
["Image5.png","Text5",-1,2,2,0,0,[]]
]>>
<<set $InfectedCardBank to [
["ImageI1","TextI1",-1,2,0,1,0,[]],
["ImageI2","TextI2",-2,-1,-1,1,2,[]],
["ImageI3","TextI3",-1,0,1,1,0,[]],
["ImageI4","TextI4",-1,1,0,0,1,[]],
["ImageI5","TextI5",-1,2,2,0,0,[]]
]>>
<<set $WerewolfCardBank to [
["ImageWW1","TextWW1",-2,-1,-1,1,2,[]],
["ImageWW2","TextWW2",-2,-1,-1,1,2,[]],
["ImageWW3","TextWW3",-2,-1,-1,1,2,[]],
["ImageWW4","TextWW4",-2,-1,-1,1,2,[]],
["ImageWW5","TextWW5",-2,-1,-1,1,2,[]]
]>><<if hasVisited("Day")>>
[[Infection List]]
[[People Information]]
<<link "Fast Forward">>
<<if passage() == "Day" && $CurrentInfectedPeople != $MaxPeople>>
<<done>><<if _canVote is true>><<goto "Before Player Processing">><</if>><</done>>
<<elseif passage() == "Before Player Processing" && $CurrentInfectedPeople != $MaxPeople>>
<<done>><<goto "Main Game">><</done>>
<<elseif passage() == "Main Game" && $CurrentInfectedPeople != $MaxPeople>>
<<done>><<goto "After Player Processing">><</done>>
<<elseif passage() == "After Player Processing" && $CurrentInfectedPeople != $MaxPeople>>
<<done>><<goto "Day">><</done>>
<</if>>
<</link>>
<</if>>
[[Tutorial/Help]]
/*<<if hasVisited("Day")>><<return "Go Back">><</if>>*/<<nobr>><div><hr>Day: <<print $DayCount>> || Infected Town People: $CurrentInfectedPeople/$MaxPeople || <<if $PlayerData[0][4] == 5>>Werewolf<<elseif $PlayerData[0][4] != 5>>Human<</if>>
<br><<do tag "PlayerInfo">>$PlayerData[0][0]: $PlayerData[0][1] HP || $PlayerData[0][2] Physical || $PlayerData[0][3] Spiritual ||<</do>>
<br>Turn Order: $TurnOrder
<hr></div><</nobr>>$PlayerData[1][0]: $PlayerData[1][1] HP || $PlayerData[1][2] Physical || $PlayerData[1][3] Spiritual || $PlayerData[0][11][1] Suspicion ||
$PlayerData[2][0]: $PlayerData[2][1] HP || $PlayerData[2][2] Physical || $PlayerData[2][3] Spiritual || $PlayerData[0][11][2] Suspicion ||
$PlayerData[3][0]: $PlayerData[3][1] HP || $PlayerData[3][2] Physical || $PlayerData[3][3] Spiritual || $PlayerData[0][11][3] Suspicion ||
$PlayerData[4][0]: $PlayerData[4][1] HP || $PlayerData[4][2] Physical || $PlayerData[4][3] Spiritual || $PlayerData[0][11][4] Suspicion ||<<set _playChance to true>>
<<if $Player0Deck[0][7].hasOwnProperty("Chance")>>
<<set _ranChance to random(0,100)>>
<<if _ranChance > $Player0Deck[0][7]["Chance"]>>
<<set _playChance to false>>
<</if>>
<</if>>
<<if $Player0Deck[0[7].hasOwnProperty("Health") && _playChance>>
<<set $PlayerData[$SelectPlayer][1] += $Player0Deck[0][7]["Health"]>>
<<elseif $Player0Deck[0][7].hasOwnProperty("Invest") && _playChance>>
<<set $FoundWerewolfItems.push($WerewolfItemList.pop())>>
<<for _lo to 0; $PlayerData.length > _lo; _lo++>>
<<if $PlayerData[_lo][11][$SelectPlayer] + $Player0Deck[0][7]["Sus"] < 0>>
<<set $PlayerData[_lo][11][$SelectPlayer] = 0>>
<<elseif $PlayerData[_lo][11][$SelectPlayer] != -1>>
<<set $PlayerData[_lo][11][$SelectPlayer] += $Player0Deck[0][7]["Sus"]>>
<</if>>
<</for>>
<<elseif $Player0Deck[0][7].hasOwnProperty("Sus") && _playChance>>
<<for _lo to 0; $PlayerData.length > _lo; _lo++>>
<<if $PlayerData[_lo][11][$SelectPlayer] + $Player0Deck[0][7]["Sus"] < 0>>
<<set $PlayerData[_lo][11][$SelectPlayer] = 0>>
<<elseif $PlayerData[_lo][11][$SelectPlayer] != -1>>
<<set $PlayerData[_lo][11][$SelectPlayer] += $Player0Deck[0][7]["Sus"]>>
<</if>>
<</for>>
<</if>>
/*<<if $Player0Deck[0][7].hasOwnProperty("Chance")>>
<<set _ranChance to random(0,100)>>
<<if _ranChance > $Player0Deck[0][7]["Chance"]>>
<<set _playChance to false>>
<</if>>
<</if>>*/
/*<<elseif $Player0Deck[0][7].hasOwnProperty("Invest") && _playChance>>
<<set $FoundWerewolfItems.push($WerewolfItemList.pop())>>
<<for _lo to 0; $PlayerData.length > _lo; _lo++>>
<<if $PlayerData[_lo][11][$SelectPlayer] + $Player0Deck[0][7]["Sus"] < 0>>
<<set $PlayerData[_lo][11][$SelectPlayer] = 0>>
<<elseif $PlayerData[_lo][11][$SelectPlayer] != -1>>
<<set $PlayerData[_lo][11][$SelectPlayer] += $Player0Deck[0][7]["Sus"]>>
<</if>>
<</for>>
<<elseif $Player0Deck[0][7].hasOwnProperty("Sus") && _playChance>>
<<for _lo to 0; $PlayerData.length > _lo; _lo++>>
<<if $PlayerData[_lo][11][$SelectPlayer] + $Player0Deck[0][7]["Sus"] < 0>>
<<set $PlayerData[_lo][11][$SelectPlayer] = 0>>
<<elseif $PlayerData[_lo][11][$SelectPlayer] != -1>>
<<set $PlayerData[_lo][11][$SelectPlayer] += $Player0Deck[0][7]["Sus"]>>
<</if>>
<</for>>*/
/* <</if>>*/
It was all so easy to infect those townspeople. The town was made to be infected. Almost like they wanted this exact outcome.
You can feel it inside of you, your werewolf soul, wanting to infect those players. The ones that tried so desperately to hunt you. To find you.
And yet, they failed.
They're all around you. Whimpering. Cowering. Even the "strong" people are afraid. They know what's going to happen. They know what they're going to become.
You start laughing. At first it was quiet, more so getting some of that energy out. Then it slowly got louder as your mind became clearer.
Its time.
Your body heats up as you continue to laugh. Your mouth makes more drool as its flung from your laughs. One of the people screamed, begging to be released.
Oh how they would regret those words once you sink your teeth into them. All it would take is one bite. One simple, little bite. And then they will be released.
And even if they do escape. They have 1,000 werewolves ready to hunt them down.
THE ENDIt was like any other day in this game. But something felt off. You couldn't place it as you were getting to the voting site, but your instincts were telling you to run far, far away. Yet you didn't listen to them, like always.
Once you arrived, it seemed like the others felt the same. Strange. However, one of the players seems to be... Happy?
Oh no.
Oh no, no, no.
You hear the doors shut loudly behind you. It seems like they knew you figured it out. But you knew it was too late. There was no way you could escape the werewolf player. Let alone 1,000 werewolves in the town surrounding you.
The player you saw being happy started snarling. That's when the others figured something was really wrong. Didn't stop you from trying to desperately escape or hide. Even though you know it would be delaying the inevitable.
The snarls only got louder, deeper, more animalistic. Sounds of bones breaking filled the room before screams did. Their clothes shredded around them. Fur completely covering their massive, towering body.
Their eyes glow slightly, almost naturally. Then... It was too late.
A bite to the neck.
Blood dripping from your wound.
Well. At least you'll become a werewolf and not die.
THE ENDThe final votes were cast by all the other players. You frantically look around at all the people who voted for you. You can feel the heat bubbling up from your soul.
You let out a snarl as your bones start breaking. Desperately trying to transform quickly to infect those who voted for you. They were correct in their vote, but you wanted more! More infections! More werewolves! MORE! MORE! MORE!
You hear one of them scream, bringing pleasure into your mind as you try to lunge at one of them. But something stops you. You can't attack them. You can't infect them.
WHY NOT!
WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY
THEY NEED TO BE INFECTED! EVERYONE SHOULD BE A WEREWOLF!!!!!
Clothing breaks as you desperately claw at the restrictive clothes. Your claws making short work of them. Still, they can't break what's holding you back.
With one long, loud howl. Your transformation is now complete! Maybe now you can finally infect them. You can see how defenseless they actually are now. Nothing can save them from you. NOTHING!
"It seems like the werewolf player lost. How sad."
"Welp. I guess you all are free to go."
Before they snapped their fingers, someone quickly screamed, "Wait!". They then ask what's going to happen to you. Why would they do anything? What they should do is let you infect them!
"What. Did you really, really think I would transform them back? Absolutely not! They're mine! MINE! And maybe next year... you all too."
With the sound of their snap, the only thought inside your mind was that you were theirs. Their werewolves. Ready to infect anyone who they ask you to.
And potentially next year the game will be different, and you'll get your revenge.
THE ENDThe final votes were cast by all the other players. You frantically look around at all the people who voted for you. You try and desperately get one of them to change their vote. But it was too late.
They all looked at you with disdain. All except one. The werewolf.
You frantically point at them, screaming that "Its them! They're the werewolf!". The others don't believe you as the werewolf quickly puts on a new face, a new mask to hide itself.
You can feel yourself starting to black out. The anger and the fear of what will happen next are keeping you awake. But your body can't fight forever; you can't fight the master of this game.
Slowly.
Slowly falling to the floor, into the black void of unconsciousness.
Sl
ow
ly.
...
...
...
"Youll make a fantastic double agent in next year's game."
THE ENDThe final votes were cast by all the other players. You all stand around looking before seeing the one who got voted transform.
Sounds of bones breaking and reshaping. You hear someone scream, frantically pointing at the voted player. Growls come from them as they desperately try to claw at anyone around them, but it seems like something's stopping them.
Their clothes start straining, then light tears show up as the fur breaks out of their clothes. Their muscles are quickly growing, only causing more clothes to tear and ultimately break.
It wasn't long before all of you were looking at a massive, muscular werewolf. Drool almost constantly drips from their mouth as they constantly show their sharp teeth. Almost begging to be freed from the invisible cage and devour all of you.
"It seems like the werewolf player lost. How sad."
"Welp. I guess you all are free to go."
Before they snapped their fingers, you quickly screamed, "Wait!". You then ask what's going to happen to the transformed player.
"What. Did you really, really think I would transform them back? Absolutely not! They're mine! MINE! And maybe next year... you all too."
You hear a snap of someone's fingers before you black out once again.
THE ENDHello one and all to this game! I hope you all enjoy it.
At this moment in time, none of the cards have really been ballenced. So you may have an easy or rough time.
Currently the game is in a good, playable state.
HOWEVER!
Beware of the game not behaving right, or certan things not working. I didnt have much time to squash as many bugs as I wanted to.
Post game jam:
Still certan things ether do not work, or might not happen the way they should. However, it should be playable without major bugs and glitches..... I hope :3
Pick your name: <<textbox "$PlayerData[0][0]" "Sammy">>
Do you want to start as a werewolf? If you say no, you still have a chance to become one!
<label><<radiobutton "$IsPlayerWerewolf" "true" autocheck>> Yes?</label>
<label><<radiobutton "$IsPlayerWerewolf" "false" autocheck>> No?</label>
[[Game Intro]] Once you awoke, you saw you weren't alone. 4 others were with you, all dazed and confused like you. All of you got only a few words in before some voice spoke to you and explained quite a lot of things.
"All ye who are here bear the mark of the Werewolf!"
"Normally I would turn you all into mindless werewolves, but this Halloween year I've decided to spice things up. You know it gets boring existing for a few hundred years. Try thousands upon thousands!"
"You 5 are going to play a simple game. One of you is secretly a werewolf, while the other 4 are humans."
"The werewolves goal is to infect a small town of... 1,000 people, turning them all into werewolves after this game is done. Of course, if the werewolf loses, they still will turn."
"The humans goal is to find out who the werewolf is. This is done by searching for clues about who the werewolf is! Only one person will have all the clues available to be found. You can figure out for yourself who that would be."
"Of course, there are some more things here and there I could say to you. And no, I'm not going to answer any of your questions. Now then, good luck to the werewolf!"
As the voice seems to stop, you look at everyone else confused. Some of them are in complete and utter fear, while others are just cussing up a storm.
"OH! Sorry to pop right back in. The game isn't... 100% complete. That... surprisingly wasn't intended. However, it makes it more fun for me to see how you will all just lose. Anyway! I've got to go and watch you all turn into werewolves!"
With what sounds like the snap of their fingers, you feel yourself black out once again. Seems like the game's about to start.
[[Lets try and win|Game Setup]] /*current player*/
<<set _CurPlay to 0>>
/*what deck does this player use */
<<if $PlayerData[_CurPlay][4] == 5>>
<<set _CurPlayDeck to ("Player" + _CurPlay + "WWDeck")>>
<<set _Type to "Werewolf">>
<<elseif $PlayerData[_CurPlay][4] == 0>>
<<set _CurPlayDeck to ("Player" + _CurPlay + "Deck")>>
<<set _Type to "Human">>
<<else>>
<<set _CurPlayDeck to ("Player" + _CurPlay + "IDeck")>>
<<set _Type to "Infected">>
<</if>>
/* Loop thu cards and find the card selected. Then do stuff with it. */
<<for _iCard to 1; (5 + 1) > _iCard; _iCard++>>
<<if $SelectedCard == _iCard>>
<<set _card to (_iCard-1)>>
<<set _cardID to ("#Card" + _iCard)>>
/* checks to see if player playing the card can actualy play it */
<<if $PlayerData[_CurPlay][2] - State.variables[_CurPlayDeck][_card][5] >= 0 && $PlayerData[_CurPlay][3] - State.variables[_CurPlayDeck][_card][6] >= 0>>
<<removeclass _cardID "handCardsSelected">>
<<addclass _cardID "handCardsUsed">>
/* If the cards target is anyone */
<<if State.variables[_CurPlayDeck][_card][2] is -1>>
/*remove cost from player who played it */
<<set $PlayerData[_CurPlay][2] -= State.variables[_CurPlayDeck][_card][5]>>
<<set $PlayerData[_CurPlay][3] -= State.variables[_CurPlayDeck][_card][6]>>
/*remove energy from target player */
<<set $PlayerData[$SelectPlayer][2] += State.variables[_CurPlayDeck][_card][3]>>
<<set $PlayerData[$SelectPlayer][3] += State.variables[_CurPlayDeck][_card][4]>>
<<set _playChance to true>>
/*check to see if card has a chance to do something special.
If the card does not have it, it will work 100% of the time.
If the card does have it, it will work so long as the rand num is under the given chance num. */
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Chance")>>
<<set _ranChance to random(0,100)>>
<<if _ranChance > parseInt(State.variables[_CurPlayDeck][_card][7]["Chance"],10)>>
<<set _playChance to false>>
<</if>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Health") && _playChance>>
<<set $PlayerData[$SelectPlayer][1] += parseInt(State.variables[_CurPlayDeck][_card][7]["Health"], 10)>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Invest") && _playChance>>
<<set $FoundWerewolfItems.push($WerewolfItemList.pop())>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Sus") && _playChance>>
<<for _lo to 0; $PlayerData.length > _lo; _lo++>>
<<if $PlayerData[_lo][11][$SelectPlayer] + parseInt(State.variables[_CurPlayDeck][_card][7]["Sus"],10) < 0>>
<<set $PlayerData[_lo][11][$SelectPlayer] = 0>>
<<elseif $PlayerData[_lo][11][$SelectPlayer] != -1>>
<<set $PlayerData[_lo][11][$SelectPlayer] += parseInt(State.variables[_CurPlayDeck][_card][7]["Sus"],10)>>
<</if>>
<</for>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("InfectR") && _playChance>>
<<set $RateOfInfection += parseInt(State.variables[_CurPlayDeck][_card][7]["InfectR"], 10)>>
<<if $RateOfInfection < 0>>
<<set $RateOfInfection to 0>>
<</if>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Infect") && _playChance>>
<<set $CurrentInfectedPeople += parseInt(State.variables[_CurPlayDeck][_card][7]["Infect"], 10)>>
<<if $CurrentInfectedPeople < 0>>
<<set $CurrentInfectedPeople to 0>>
<</if>>
<</if>>
/* The card must be targeting whoever played it */
<<else>>
<<set $PlayerData[_CurPlay][2] -= State.variables[_CurPlayDeck][_card][5]>>
<<set $PlayerData[_CurPlay][3] -= State.variables[_CurPlayDeck][_card][6]>>
<<set $PlayerData[_CurPlay][2] += State.variables[_CurPlayDeck][_card][3]>>
<<set $PlayerData[_CurPlay][3] += State.variables[_CurPlayDeck][_card][4]>>
<<set _playChance to true>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Chance")>>
<<set _ranChance to random(0,100)>>
<<if _ranChance > parseInt(State.variables[_CurPlayDeck][_iCard][7]["Chance"],10)>>
<<set _playChance to false>>
<</if>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Health")>>
<<set $PlayerData[_CurPlay][1] += parseInt(State.variables[_CurPlayDeck][_card][7]["Health"], 10)>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Invest") && _playChance>>
<<set $FoundWerewolfItems.push($WerewolfItemList.pop())>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Sus") && _playChance>>
<<for _lo to 0; $PlayerData.length > _lo; _lo++>>
<<if $PlayerData[_lo][11][_CurPlay] + parseInt(State.variables[_CurPlayDeck][_card][7]["Sus"],10) < 0>>
<<set $PlayerData[_lo][11][_CurPlay] = 0>>
<<elseif $PlayerData[_lo][11][_CurPlay] != -1>>
<<set $PlayerData[_lo][11][_CurPlay] += parseInt(State.variables[_CurPlayDeck][_card][7]["Sus"],10)>>
<</if>>
<</for>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("InfectR")>>
<<set $RateOfInfection += parseInt(State.variables[_CurPlayDeck][_card][7]["InfectR"], 10)>>
<<if $RateOfInfection < 0>>
<<set $RateOfInfection to 0>>
<</if>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Infect")>>
<<set $CurrentInfectedPeople += parseInt(State.variables[_CurPlayDeck][_card][7]["Infect"], 10)>>
<<if $CurrentInfectedPeople < 0>>
<<set $CurrentInfectedPeople to 0>>
<</if>>
<</if>>
<</if>>
<<else>>
<<removeclass _cardID "handCardsSelected">>
<<script>>
/*The player playing the card cannot play said card */
Dialog.setup("Cannot Play Card");
Dialog.wiki("You do not have enough Physical or Spiritual Energy to play this card!");
Dialog.open();
<</script>>
<</if>>
<</if>>
<</for>>
CPU Verson:
/* Loop thu cards and find the card selected. Then do stuff with it. */
<<for _iCard to 1; (5 + 1) > _iCard; _iCard++>>
<<set _card to (_iCard-1)>>
<<if _playedCards[_card] != 1>>
/* checks to see if player playing the card can actualy play it */
<<if $PlayerData[_CurPlay][2] - State.variables[_CurPlayDeck][_card][5] >= 0 && $PlayerData[_CurPlay][3] - State.variables[_CurPlayDeck][_card][6] >= 0>>
/* If the cards target is anyone */
<<if State.variables[_CurPlayDeck][_card][2] is -1>>
/*remove cost from player who played it */
<<set $PlayerData[_CurPlay][2] -= State.variables[_CurPlayDeck][_card][5]>>
<<set $PlayerData[_CurPlay][3] -= State.variables[_CurPlayDeck][_card][6]>>
/*remove energy from target player */
<<set $PlayerData[$SelectPlayer][2] += State.variables[_CurPlayDeck][_card][3]>>
<<set $PlayerData[$SelectPlayer][3] += State.variables[_CurPlayDeck][_card][4]>>
<<set _playChance to true>>
/*check to see if card has a chance to do something special.
If the card does not have it, it will work 100% of the time.
If the card does have it, it will work so long as the rand num is under the given chance num. */
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Chance")>>
<<set _ranChance to random(0,100)>>
<<if _ranChance > parseInt(State.variables[_CurPlayDeck][_card][7]["Chance"],10)>>
<<set _playChance to false>>
<</if>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Health") && _playChance>>
<<set $PlayerData[$SelectPlayer][1] += parseInt(State.variables[_CurPlayDeck][_card][7]["Health"], 10)>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Invest") && _playChance>>
<<set $FoundWerewolfItems.push($WerewolfItemList.pop())>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Sus") && _playChance>>
<<for _lo to 0; $PlayerData.length > _lo; _lo++>>
<<if $PlayerData[_lo][11][$SelectPlayer] + parseInt(State.variables[_CurPlayDeck][_card][7]["Sus"],10) < 0>>
<<set $PlayerData[_lo][11][$SelectPlayer] = 0>>
<<elseif $PlayerData[_lo][11][$SelectPlayer] != -1>>
<<set $PlayerData[_lo][11][$SelectPlayer] += parseInt(State.variables[_CurPlayDeck][_card][7]["Sus"],10)>>
<</if>>
<</for>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("InfectR") && _playChance>>
<<set $RateOfInfection += parseInt(State.variables[_CurPlayDeck][_card][7]["InfectR"], 10)>>
<<if $RateOfInfection < 0>>
<<set $RateOfInfection to 0>>
<</if>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Infect") && _playChance>>
<<set $CurrentInfectedPeople += parseInt(State.variables[_CurPlayDeck][_card][7]["Infect"], 10)>>
<<if $CurrentInfectedPeople < 0>>
<<set $CurrentInfectedPeople to 0>>
<</if>>
<</if>>
/* The card must be targeting whoever played it */
<<else>>
<<set $PlayerData[_CurPlay][2] -= State.variables[_CurPlayDeck][_card][5]>>
<<set $PlayerData[_CurPlay][3] -= State.variables[_CurPlayDeck][_card][6]>>
<<set $PlayerData[_CurPlay][2] += State.variables[_CurPlayDeck][_card][3]>>
<<set $PlayerData[_CurPlay][3] += State.variables[_CurPlayDeck][_card][4]>>
<<set _playChance to true>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Chance")>>
<<set _ranChance to random(0,100)>>
<<if _ranChance > parseInt(State.variables[_CurPlayDeck][_iCard][7]["Chance"],10)>>
<<set _playChance to false>>
<</if>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Health")>>
<<set $PlayerData[_CurPlay][1] += parseInt(State.variables[_CurPlayDeck][_card][7]["Health"], 10)>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Invest") && _playChance>>
<<set $FoundWerewolfItems.push($WerewolfItemList.pop())>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Sus") && _playChance>>
<<for _lo to 0; $PlayerData.length > _lo; _lo++>>
<<if $PlayerData[_lo][11][_CurPlay] + parseInt(State.variables[_CurPlayDeck][_card][7]["Sus"],10) < 0>>
<<set $PlayerData[_lo][11][_CurPlay] = 0>>
<<elseif $PlayerData[_lo][11][_CurPlay] != -1>>
<<set $PlayerData[_lo][11][_CurPlay] += parseInt(State.variables[_CurPlayDeck][_card][7]["Sus"],10)>>
<</if>>
<</for>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("InfectR")>>
<<set $RateOfInfection += parseInt(State.variables[_CurPlayDeck][_card][7]["InfectR"], 10)>>
<<if $RateOfInfection < 0>>
<<set $RateOfInfection to 0>>
<</if>>
<</if>>
<<if State.variables[_CurPlayDeck][_card][7].hasOwnProperty("Infect")>>
<<set $CurrentInfectedPeople += parseInt(State.variables[_CurPlayDeck][_card][7]["Infect"], 10)>>
<<if $CurrentInfectedPeople < 0>>
<<set $CurrentInfectedPeople to 0>>
<</if>>
<</if>>
<<set _playedCards[_card] to 1>>
<<set _hasPlayedCard to true>>
<</if>>
<</if>>
<</if>>
<</for>>
<<if $SelectedCard is 1>>
<<if $PlayerData[0][2] - $Player0Deck[0][5] >= 0 && $PlayerData[0][3] - $Player0Deck[0][6] >= 0>>
<<removeclass "#Card1" "handCardsSelected">>
<<addclass "#Card1" "handCardsUsed">>
<<if $Player0Deck[0][2] is -1>>
<<set $PlayerData[0][2] -= $Player0Deck[0][5]>>
<<set $PlayerData[0][3] -= $Player0Deck[0][6]>>
<<set $PlayerData[$SelectPlayer][2] += $Player0Deck[0][3]>>
<<set $PlayerData[$SelectPlayer][3] += $Player0Deck[0][4]>>
<<set _playChance to true>>
<<if $Player0Deck[0][7].hasOwnProperty("Chance")>>
<<set _ranChance to random(0,100)>>
<<if _ranChance > parseInt($Player0Deck[0][7]["Chance"],10)>>
<<set _playChance to false>>
<</if>>
<</if>>
<<if $Player0Deck[0][7].hasOwnProperty("Health")>>
<<set $PlayerData[$SelectPlayer][1] += parseInt($Player0Deck[0][7]["Health"], 10)>>
<</if>>
<<if $Player0Deck[0][7].hasOwnProperty("Invest") && _playChance>>
<<set $FoundWerewolfItems.push($WerewolfItemList.pop())>>
<</if>>
<<if $Player0Deck[0][7].hasOwnProperty("Sus") && _playChance>>
<<for _lo to 0; $PlayerData.length > _lo; _lo++>>
<<if $PlayerData[_lo][11][$SelectPlayer] + parseInt($Player0Deck[0][7]["Sus"],10) < 0>>
<<set $PlayerData[_lo][11][$SelectPlayer] = 0>>
<<elseif $PlayerData[_lo][11][$SelectPlayer] != -1>>
<<set $PlayerData[_lo][11][$SelectPlayer] += parseInt($Player0Deck[0][7]["Sus"],10)>>
<</if>>
<</for>>
<</if>>
<<if $Player0Deck[0][7].hasOwnProperty("InfectR")>>
<<set $RateOfInfection += parseInt($Player0Deck[0][7]["InfectR"], 10)>>
<</if>>
<<if $Player0Deck[0][7].hasOwnProperty("Infect")>>
<<set $CurrentInfectedPeople += parseInt($Player0Deck[0][7]["Infect"], 10)>>
<</if>>
<<else>>
<<set $PlayerData[0][2] -= $Player0Deck[0][5]>>
<<set $PlayerData[0][3] -= $Player0Deck[0][6]>>
<<set $PlayerData[0][2] += $Player0Deck[0][3]>>
<<set $PlayerData[0][3] += $Player0Deck[0][4]>>
<<set _playChance to true>>
<<if $Player0Deck[0][7].hasOwnProperty("Chance")>>
<<set _ranChance to random(0,100)>>
<<if _ranChance > parseInt($Player0Deck[0][7]["Chance"],10)>>
<<set _playChance to false>>
<</if>>
<</if>>
<<if $Player0Deck[0][7].hasOwnProperty("Health")>>
<<set $PlayerData[0][1] += parseInt($Player0Deck[0][7]["Health"], 10)>>
<</if>>
<<if $Player0Deck[0][7].hasOwnProperty("Invest") && _playChance>>
<<set $FoundWerewolfItems.push($WerewolfItemList.pop())>>
<</if>>
<<if $Player0Deck[0][7].hasOwnProperty("Sus") && _playChance>>
<<for _lo to 0; $PlayerData.length > _lo; _lo++>>
<<if $PlayerData[_lo][11][0] + parseInt($Player0Deck[0][7]["Sus"],10) < 0>>
<<set $PlayerData[_lo][11][0] = 0>>
<<elseif $PlayerData[_lo][11][0] != -1>>
<<set $PlayerData[_lo][11][0] += parseInt($Player0Deck[0][7]["Sus"],10)>>
<</if>>
<</for>>
<</if>>
<<if $Player0Deck[0][7].hasOwnProperty("InfectR")>>
<<set $RateOfInfection += parseInt($Player0Deck[0][7]["InfectR"], 10)>>
<</if>>
<<if $Player0Deck[0][7].hasOwnProperty("Infect")>>
<<set $CurrentInfectedPeople += parseInt($Player0Deck[0][7]["Infect"], 10)>>
<</if>>
<</if>>
<<else>>
<<removeclass "#Card1" "handCardsSelected">>
<<script>>
Dialog.setup("Cannot Play Card");
Dialog.wiki("You do not have enough Physical or Spiritual Energy to play this card!");
Dialog.open();
<</script>>
<</if>>
<<elseif $SelectedCard is 2>>
<<if $PlayerData[0][2] - $Player0Deck[1][5] >= 0 && $PlayerData[0][3] - $Player0Deck[1][6] >= 0>>
<<removeclass "#Card2" "handCardsSelected">>
<<addclass "#Card2" "handCardsUsed">>
<<if $Player0Deck[1][2] is -1>>
<<set $PlayerData[0][2] -= $Player0Deck[1][5]>>
<<set $PlayerData[0][3] -= $Player0Deck[1][6]>>
<<set $PlayerData[$SelectPlayer][2] += $Player0Deck[1][3]>>
<<set $PlayerData[$SelectPlayer][3] += $Player0Deck[1][4]>>
<<set _playChance to true>>
<<if $Player0Deck[1][7].hasOwnProperty("Chance")>>
<<set _ranChance to random(0,100)>>
<<if _ranChance > parseInt($Player0Deck[1][7]["Chance"],10)>>
<<set _playChance to false>>
<</if>>
<</if>>
<<if $Player0Deck[1][7].hasOwnProperty("Health")>>
<<set $PlayerData[$SelectPlayer][1] += parseInt($Player0Deck[1][7]["Health"], 10)>>
<</if>>
<<if $Player0Deck[1][7].hasOwnProperty("Invest") && _playChance>>
<<set $FoundWerewolfItems.push($WerewolfItemList.pop())>>
<</if>>
<<if $Player0Deck[1][7].hasOwnProperty("Sus") && _playChance>>
<<for _lo to 0; $PlayerData.length > _lo; _lo++>>
<<if $PlayerData[_lo][11][$SelectPlayer] + parseInt($Player0Deck[1][7]["Sus"],10) < 0>>
<<set $PlayerData[_lo][11][$SelectPlayer] = 0>>
<<elseif $PlayerData[_lo][11][$SelectPlayer] != -1>>
<<set $PlayerData[_lo][11][$SelectPlayer] += parseInt($Player0Deck[1][7]["Sus"],10)>>
<</if>>
<</for>>
<</if>>
<<if $Player0Deck[0][7].hasOwnProperty("InfectR")>>
<<set $RateOfInfection += parseInt($Player0Deck[1][7]["InfectR"], 10)>>
<</if>>
<<if $Player0Deck[0][7].hasOwnProperty("Infect")>>
<<set $CurrentInfectedPeople += parseInt($Player0Deck[1][7]["Infect"], 10)>>
<</if>>
<<else>>
<<set $PlayerData[0][2] -= $Player0Deck[1][5]>>
<<set $PlayerData[0][3] -= $Player0Deck[1][6]>>
<<set $PlayerData[0][2] += $Player0Deck[1][3]>>
<<set $PlayerData[0][3] += $Player0Deck[1][4]>>
<<set _playChance to true>>
<<if $Player0Deck[1][7].hasOwnProperty("Chance")>>
<<set _ranChance to random(0,100)>>
<<if _ranChance > parseInt($Player0Deck[1][7]["Chance"],10)>>
<<set _playChance to false>>
<</if>>
<</if>>
<<if $Player0Deck[1][7].hasOwnProperty("Health")>>
<<set $PlayerData[0][1] += parseInt($Player0Deck[1][7]["Health"], 10)>>
<</if>>
<<if $Player0Deck[1][7].hasOwnProperty("Invest") && _playChance>>
<<set $FoundWerewolfItems.push($WerewolfItemList.pop())>>
<</if>>
<<if $Player0Deck[1][7].hasOwnProperty("Sus") && _playChance>>
<<for _lo to 0; $PlayerData.length > _lo; _lo++>>
<<if $PlayerData[_lo][11][0] + parseInt($Player0Deck[1][7]["Sus"],10) < 0>>
<<set $PlayerData[_lo][11][0] = 0>>
<<elseif $PlayerData[_lo][11][0] != -1>>
<<set $PlayerData[_lo][11][0] += parseInt($Player0Deck[1][7]["Sus"],10)>>
<</if>>
<</for>>
<</if>>
<<if $Player0Deck[0][7].hasOwnProperty("InfectR")>>
<<set $RateOfInfection += parseInt($Player0Deck[1][7]["InfectR"], 10)>>
<</if>>
<<if $Player0Deck[0][7].hasOwnProperty("Infect")>>
<<set $CurrentInfectedPeople += parseInt($Player0Deck[1][7]["Infect"], 10)>>
<</if>>
<</if>>
<<else>>
<<removeclass "#Card2" "handCardsSelected">>
<<script>>
Dialog.setup("Cannot Play Card");
Dialog.wiki("You do not have enough Physical or Spiritual Energy to play this card!");
Dialog.open();
<</script>>
<</if>>
<<elseif $SelectedCard is 3>>
<<if $PlayerData[0][2] - $Player0Deck[2][5] >= 0 && $PlayerData[0][3] - $Player0Deck[2][6] >= 0>>
<<removeclass "#Card3" "handCardsSelected">>
<<addclass "#Card3" "handCardsUsed">>
<<if $Player0Deck[2][2] is -1>>
<<set $PlayerData[0][2] -= $Player0Deck[2][5]>>
<<set $PlayerData[0][3] -= $Player0Deck[2][6]>>
<<set $PlayerData[$SelectPlayer][2] += $Player0Deck[2][3]>>
<<set $PlayerData[$SelectPlayer][3] += $Player0Deck[2][4]>>
<<set _playChance to true>>
<<if $Player0Deck[2][7].hasOwnProperty("Chance")>>
<<set _ranChance to random(0,100)>>
<<if _ranChance > parseInt($Player0Deck[2][7]["Chance"],10)>>
<<set _playChance to false>>
<</if>>
<</if>>
<<if $Player0Deck[2][7].hasOwnProperty("Health")>>
<<set $PlayerData[$SelectPlayer][1] += parseInt($Player0Deck[2][7]["Health"], 10)>>
<</if>>
<<if $Player0Deck[2][7].hasOwnProperty("Invest") && _playChance>>
<<set $FoundWerewolfItems.push($WerewolfItemList.pop())>>
<</if>>
<<if $Player0Deck[2][7].hasOwnProperty("Sus") && _playChance>>
<<for _lo to 0; $PlayerData.length > _lo; _lo++>>
<<if $PlayerData[_lo][11][$SelectPlayer] + parseInt($Player0Deck[2][7]["Sus"],10) < 0>>
<<set $PlayerData[_lo][11][$SelectPlayer] = 0>>
<<elseif $PlayerData[_lo][11][$SelectPlayer] != -1>>
<<set $PlayerData[_lo][11][$SelectPlayer] += parseInt($Player0Deck[2][7]["Sus"],10)>>
<</if>>
<</for>>
<</if>>
<<if $Player0Deck[0][7].hasOwnProperty("InfectR")>>
<<set $RateOfInfection += parseInt($Player0Deck[2][7]["InfectR"], 10)>>
<</if>>
<<if $Player0Deck[0][7].hasOwnProperty("Infect")>>
<<set $CurrentInfectedPeople += parseInt($Player0Deck[2][7]["Infect"], 10)>>
<</if>>
<<else>>
<<set $PlayerData[0][2] -= $Player0Deck[2][5]>>
<<set $PlayerData[0][3] -= $Player0Deck[2][6]>>
<<set $PlayerData[0][2] += $Player0Deck[2][3]>>
<<set $PlayerData[0][3] += $Player0Deck[2][4]>>
<<set _playChance to true>>
<<if $Player0Deck[2][7].hasOwnProperty("Chance")>>
<<set _ranChance to random(0,100)>>
<<if _ranChance > parseInt($Player0Deck[2][7]["Chance"],10)>>
<<set _playChance to false>>
<</if>>
<</if>>
<<if $Player0Deck[2][7].hasOwnProperty("Health")>>
<<set $PlayerData[0][1] += parseInt($Player0Deck[2][7]["Health"], 10)>>
<</if>>
<<if $Player0Deck[2][7].hasOwnProperty("Invest") && _playChance>>
<<set $FoundWerewolfItems.push($WerewolfItemList.pop())>>
<</if>>
<<if $Player0Deck[2][7].hasOwnProperty("Sus") && _playChance>>
<<for _lo to 0; $PlayerData.length > _lo; _lo++>>
<<if $PlayerData[_lo][11][0] + parseInt($Player0Deck[2][7]["Sus"],10) < 0>>
<<set $PlayerData[_lo][11][0] = 0>>
<<elseif $PlayerData[_lo][11][0] != -1>>
<<set $PlayerData[_lo][11][0] += parseInt($Player0Deck[2][7]["Sus"],10)>>
<</if>>
<</for>>
<</if>>
<<if $Player0Deck[0][7].hasOwnProperty("InfectR")>>
<<set $RateOfInfection += parseInt($Player0Deck[2][7]["InfectR"], 10)>>
<</if>>
<<if $Player0Deck[0][7].hasOwnProperty("Infect")>>
<<set $CurrentInfectedPeople += parseInt($Player0Deck[2][7]["Infect"], 10)>>
<</if>>
<</if>>
<<else>>
<<removeclass "#Card3" "handCardsSelected">>
<<script>>
Dialog.setup("Cannot Play Card");
Dialog.wiki("You do not have enough Physical or Spiritual Energy to play this card!");
Dialog.open();
<</script>>
<</if>>
<<elseif $SelectedCard is 4>>
<<if $PlayerData[0][2] - $Player0Deck[3][5] >= 0 && $PlayerData[0][3] - $Player0Deck[3][6] >= 0>>
<<removeclass "#Card4" "handCardsSelected">>
<<addclass "#Card4" "handCardsUsed">>
<<if $Player0Deck[3][2] is -1>>
<<set $PlayerData[0][2] -= $Player0Deck[3][5]>>
<<set $PlayerData[0][3] -= $Player0Deck[3][6]>>
<<set $PlayerData[$SelectPlayer][2] += $Player0Deck[3][3]>>
<<set $PlayerData[$SelectPlayer][3] += $Player0Deck[3][4]>>
<<set _playChance to true>>
<<if $Player0Deck[3][7].hasOwnProperty("Chance")>>
<<set _ranChance to random(0,100)>>
<<if _ranChance > parseInt($Player0Deck[3][7]["Chance"],10)>>
<<set _playChance to false>>
<</if>>
<</if>>
<<if $Player0Deck[3][7].hasOwnProperty("Health")>>
<<set $PlayerData[$SelectPlayer][1] += parseInt($Player0Deck[3][7]["Health"], 10)>>
<</if>>
<<if $Player0Deck[3][7].hasOwnProperty("Invest") && _playChance>>
<<set $FoundWerewolfItems.push($WerewolfItemList.pop())>>
<</if>>
<<if $Player0Deck[3][7].hasOwnProperty("Sus") && _playChance>>
<<for _lo to 0; $PlayerData.length > _lo; _lo++>>
<<if $PlayerData[_lo][11][$SelectPlayer] + parseInt($Player0Deck[3][7]["Sus"],10) < 0>>
<<set $PlayerData[_lo][11][$SelectPlayer] = 0>>
<<elseif $PlayerData[_lo][11][$SelectPlayer] != -1>>
<<set $PlayerData[_lo][11][$SelectPlayer] += parseInt($Player0Deck[3][7]["Sus"],10)>>
<</if>>
<</for>>
<</if>>
<<if $Player0Deck[0][7].hasOwnProperty("InfectR")>>
<<set $RateOfInfection += parseInt($Player0Deck[3][7]["InfectR"], 10)>>
<</if>>
<<if $Player0Deck[0][7].hasOwnProperty("Infect")>>
<<set $CurrentInfectedPeople += parseInt($Player0Deck[3][7]["Infect"], 10)>>
<</if>>
<<else>>
<<set $PlayerData[0][2] -= $Player0Deck[3][5]>>
<<set $PlayerData[0][3] -= $Player0Deck[3][6]>>
<<set $PlayerData[0][2] += $Player0Deck[3][3]>>
<<set $PlayerData[0][3] += $Player0Deck[3][4]>>
<<set _playChance to true>>
<<if $Player0Deck[3][7].hasOwnProperty("Chance")>>
<<set _ranChance to random(0,100)>>
<<if _ranChance > parseInt($Player0Deck[3][7]["Chance"],10)>>
<<set _playChance to false>>
<</if>>
<</if>>
<<if $Player0Deck[3][7].hasOwnProperty("Health")>>
<<set $PlayerData[0][1] += parseInt($Player0Deck[3][7]["Health"], 10)>>
<</if>>
<<if $Player0Deck[3][7].hasOwnProperty("Invest") && _playChance>>
<<set $FoundWerewolfItems.push($WerewolfItemList.pop())>>
<</if>>
<<if $Player0Deck[2][7].hasOwnProperty("Sus") && _playChance>>
<<for _lo to 0; $PlayerData.length > _lo; _lo++>>
<<if $PlayerData[_lo][11][0] + parseInt($Player0Deck[3][7]["Sus"],10) < 0>>
<<set $PlayerData[_lo][11][0] = 0>>
<<elseif $PlayerData[_lo][11][0] != -1>>
<<set $PlayerData[_lo][11][0] += parseInt($Player0Deck[3][7]["Sus"],10)>>
<</if>>
<</for>>
<</if>>
<<if $Player0Deck[0][7].hasOwnProperty("InfectR")>>
<<set $RateOfInfection += parseInt($Player0Deck[3][7]["InfectR"], 10)>>
<</if>>
<<if $Player0Deck[0][7].hasOwnProperty("Infect")>>
<<set $CurrentInfectedPeople += parseInt($Player0Deck[3][7]["Infect"], 10)>>
<</if>>
<</if>>
<<else>>
<<removeclass "#Card4" "handCardsSelected">>
<<script>>
Dialog.setup("Cannot Play Card");
Dialog.wiki("You do not have enough Physical or Spiritual Energy to play this card!");
Dialog.open();
<</script>>
<</if>>
<<elseif $SelectedCard is 5>>
<<if $PlayerData[0][2] - $Player0Deck[4][5] >= 0 && $PlayerData[0][3] - $Player0Deck[4][6] >= 0>>
<<removeclass "#Card5" "handCardsSelected">>
<<addclass "#Card5" "handCardsUsed">>
<<if $Player0Deck[4][2] is -1>>
<<set $PlayerData[0][2] -= $Player0Deck[4][5]>>
<<set $PlayerData[0][3] -= $Player0Deck[4][6]>>
<<set $PlayerData[$SelectPlayer][2] += $Player0Deck[4][3]>>
<<set $PlayerData[$SelectPlayer][3] += $Player0Deck[4][4]>>
<<set _playChance to true>>
<<if $Player0Deck[4][7].hasOwnProperty("Chance")>>
<<set _ranChance to random(0,100)>>
<<if _ranChance > parseInt($Player0Deck[4][7]["Chance"],10)>>
<<set _playChance to false>>
<</if>>
<</if>>
<<if $Player0Deck[4][7].hasOwnProperty("Health")>>
<<set $PlayerData[$SelectPlayer][1] += parseInt($Player0Deck[4][7]["Health"], 10)>>
<</if>>
<<if $Player0Deck[4][7].hasOwnProperty("Invest") && _playChance>>
<<set $FoundWerewolfItems.push($WerewolfItemList.pop())>>
<</if>>
<<if $Player0Deck[4][7].hasOwnProperty("Sus") && _playChance>>
<<for _lo to 0; $PlayerData.length > _lo; _lo++>>
<<if $PlayerData[_lo][11][$SelectPlayer] + parseInt($Player0Deck[4][7]["Sus"],10) < 0>>
<<set $PlayerData[_lo][11][$SelectPlayer] = 0>>
<<elseif $PlayerData[_lo][11][$SelectPlayer] != -1>>
<<set $PlayerData[_lo][11][$SelectPlayer] += parseInt($Player0Deck[4][7]["Sus"],10)>>
<</if>>
<</for>>
<</if>>
<<if $Player0Deck[0][7].hasOwnProperty("InfectR")>>
<<set $RateOfInfection += parseInt($Player0Deck[4][7]["InfectR"], 10)>>
<</if>>
<<if $Player0Deck[0][7].hasOwnProperty("Infect")>>
<<set $CurrentInfectedPeople += parseInt($Player0Deck[4][7]["Infect"], 10)>>
<</if>>
<<else>>
<<set $PlayerData[0][2] -= $Player0Deck[4][5]>>
<<set $PlayerData[0][3] -= $Player0Deck[4][6]>>
<<set $PlayerData[0][2] += $Player0Deck[4][3]>>
<<set $PlayerData[0][3] += $Player0Deck[4][4]>>
<<set _playChance to true>>
<<if $Player0Deck[4][7].hasOwnProperty("Chance")>>
<<set _ranChance to random(0,100)>>
<<if _ranChance > parseInt($Player0Deck[4][7]["Chance"],10)>>
<<set _playChance to false>>
<</if>>
<</if>>
<<if $Player0Deck[4][7].hasOwnProperty("Health")>>
<<set $PlayerData[0][1] += parseInt($Player0Deck[4][7]["Health"], 10)>>
<</if>>
<<if $Player0Deck[4][7].hasOwnProperty("Invest") && _playChance>>
<<set $FoundWerewolfItems.push($WerewolfItemList.pop())>>
<</if>>
<<if $Player0Deck[4][7].hasOwnProperty("Sus") && _playChance>>
<<for _lo to 0; $PlayerData.length > _lo; _lo++>>
<<if $PlayerData[_lo][11][0] + parseInt($Player0Deck[4][7]["Sus"],10) < 0>>
<<set $PlayerData[_lo][11][0] = 0>>
<<elseif $PlayerData[_lo][11][0] != -1>>
<<set $PlayerData[_lo][11][0] += parseInt($Player0Deck[4][7]["Sus"],10)>>
<</if>>
<</for>>
<</if>>
<<if $Player0Deck[0][7].hasOwnProperty("InfectR")>>
<<set $RateOfInfection += parseInt($Player0Deck[4][7]["InfectR"], 10)>>
<</if>>
<<if $Player0Deck[0][7].hasOwnProperty("Infect")>>
<<set $CurrentInfectedPeople += parseInt($Player0Deck[4][7]["Infect"], 10)>>
<</if>>
<</if>>
<<else>>
<<removeclass "#Card5" "handCardsSelected">>
<<script>>
Dialog.setup("Cannot Play Card");
Dialog.wiki("You do not have enough Physical or Spiritual Energy to play this card!");
Dialog.open();
<</script>>
<</if>>
<</if>>
GAME VERSION: $GameVersion
Quick tutorial for people who need it!
Some things to note:
* This game, in its simplicity, is a website.
- With this in mind, each new screen you see will be called a page in this tutorial.
* All blue text is a link that will take you to a different page.
* The blue buttons tend to do a certain action that it says on the button.
* The buttons on the side panel will take you to a new page (more detail down below).
* Anytime you arrive at a new page, you can go back using the arrows on the top right in that expanding menu (if the menu is closed, click the little arrow pointing out; you'll know if it's open if you can see the title of the game, "Playing a Werewolves Hand")
- When you go back to a different page using the arrows at the top, it brings you back to when you first saw it. So be careful if you make changes and then click the buttons on the side panel; those changes will be erased if you go back.
<hr>
Quick how-to-play summery:
In the day, you vote for who is the werewolf. When there is a majority of votes for said character, they are voted out. If there is no majority, you move on to your turn. Your turn is where you can play cards to affect yourself, characters, find items, and more. These cost Physical Energy or Spiritual Energy (for shorthand and in-game, they're referred to as also just Physical and Spiritual).
Inorder to find the werewolf, you need to find items in the game. These items are shown on the "Infection List" on the side of the game. That page will show you all the items that all the players have collected. If a person has all of their items found, they are the werewolf.
<hr>
How to Play:
The game functions on a looping day system. You will go from Day -> Whoever is in front of you in the turn order goes -> Your turn -> Whoever is behind you in the turn order goes. Then it loops.
There is currently no max day, so you don't need to worry about taking 1000 days to win or lose the game.
Day:
On the day screen, you have 5 choices on who to pick is the werewolf. This will happen every day. You can see who has the votes by looking where it says "Votes:". Whoever has the majority of votes will get thrown out (3 for 5 players, 3 for 4 players, 2 for 3 players, then none for 2 players).
The CPU will use their suspicion stat for each player to know who to vote for. This information is not revealed to the player. The player, however, also has their suspicion stat for each player. This is here for you simply to use as you make a choice.
Once you pick a player, you then click the "Submit" button. This button will then prompt you, underneath it, if this is your choice. If you say yes, your vote is cast. The outcome of the votes is then shown below that, in the blue text.
This is also where all players will gain some Physical Energy and Spiritual Energy back.
Whoever is in front of you in the turn order goes:
Simply click on the blue "Your Turn" text; there is nothing you need to do here.
Your turn:
Once it's your turn, you will see 5 cards that you can play. Each card will have its description of what it does. If the card says "Selected player", you select the player by the dropdown textbox that has the words "Select Player:" above it.
To play a card, all you need to do is click on the card you want to play and then press the "Use Card" button. It will then use that selected card. If a card cannot be played, you will get a popup that tells you that you cannot play the card. Click on the x on the top right of said popup to close it.
Inorder to use a card, it will cost either Physical Energy or Spiritual Energy (for shorthand and in-game, it's also referred to as just Physical and Spiritual). Your Physical and Spiritual are always shown on the top of the page, as well as your HP.
Once you are done playing your cards, you can click the blue "Next turn" text.
Whoever behind you in the turn order goes:
Simply click on the blue "Your Turn" text; there is nothing you need to do here.
<hr>
Side Panel:
The side panel is the panel where it says the game's name, "Playing a Werewolves Hand", some buttons, and the save and restart buttons.
Infection List:
On this page you will see a list of items that go with each player. This is how you determine who the werewolf is. The only person who has all 6 items is the werewolf.
All found items will be shown after the text "Found Items:", any found items will then be shown in green on the player list of items, showing that they have been found.
People Information:
Like what you would see when it's your turn, where you can see the player's name, HP, Physical Energy, Spiritual Energy, and Suspicion.
Fast Forward:
Allows you to just click the button to skip to the next assumed page without doing anything. This is useful for when you're just waiting to win or waiting for more energy to actually play cards.
Tutorial/Help
You are here :3
<hr>