summaryrefslogtreecommitdiff
path: root/npc/027-2_Caretakers_House/werewolf.txt
diff options
context:
space:
mode:
authorJessica Tölke <jtoelke@mail.upb.de>2011-02-12 18:33:15 +0100
committerJessica Tölke <jtoelke@mail.upb.de>2011-02-12 18:33:15 +0100
commit91534435e2f94d1d729b111e3fea763c8411fa0a (patch)
treee58911e078058f5bff7983a95065f5562b71f788 /npc/027-2_Caretakers_House/werewolf.txt
parenta99d170121beee1b1a0506d98e6e11a8e425c831 (diff)
downloadserverdata-91534435e2f94d1d729b111e3fea763c8411fa0a.tar.gz
serverdata-91534435e2f94d1d729b111e3fea763c8411fa0a.tar.bz2
serverdata-91534435e2f94d1d729b111e3fea763c8411fa0a.tar.xz
serverdata-91534435e2f94d1d729b111e3fea763c8411fa0a.zip
gy inn: adding black jack to the werewolf (game mechanics is copied from the casino.txt)
Diffstat (limited to 'npc/027-2_Caretakers_House/werewolf.txt')
-rw-r--r--npc/027-2_Caretakers_House/werewolf.txt67
1 files changed, 64 insertions, 3 deletions
diff --git a/npc/027-2_Caretakers_House/werewolf.txt b/npc/027-2_Caretakers_House/werewolf.txt
index ffde29d9..098a8699 100644
--- a/npc/027-2_Caretakers_House/werewolf.txt
+++ b/npc/027-2_Caretakers_House/werewolf.txt
@@ -5,7 +5,8 @@
set @state, ((QUEST_Graveyard_Inn & @Graveyard_Inn_MASK) >> @Graveyard_Inn_SHIFT);
set @ANIMALBONES_AMOUNT, 30;
- set @ANIMALBONES_EXP, 75000;
+ set @ANIMALBONES_EXP, 40000;
+ set @money, 1000;
if (@state > 1) goto L_Happy;
if (@state == 1) goto L_Bones;
@@ -76,14 +77,74 @@ L_Happy:
mes "He pulls a card game out of his pocket.";
next;
mes "[Werewolf]";
- mes "\"You will need TODO: how much? GP.\"";
+ mes "\"You will need " + @money + " GP.\"";
menu
"Sure, why not?",L_Game,
"No, thanks.",-;
close;
+//The game mechanics is copied from casino.txt
L_Game:
-//TODO: add
+ if(zeny < @money) goto L_No_Money;
+ mes "[Werewolf]";
+ mes "\"Very nice. Let's start.\"";
+ mes "He shuffles the cards.";
+ next;
+ set zeny, zeny - @money;
+ set @croupier, rand(0, 4);
+ set @croupier, @croupier + 17;
+ set @player, rand(4, 21);
+ mes "\"You got " + @player + " with your cards.";
+ if(@player == 21) goto L_End;
+ mes "Do you want another card?\"";
+ next;
+
+ menu
+ "Yes.", L_Another,
+ "No.", L_End;
+
+L_Another:
+ set @tempace, rand(2, 11);
+ if (@tempace == 11) goto L_Ace;
+ set @player, @player + @tempace;
+ if (@player > 21) goto L_Lost;
+ if (@player == 21) goto L_End;
+ mes "\"You got " + @player + " with your cards.";
+ mes "Do you want another card?\"";
+ next;
+
+ menu
+ "Yes", L_Another,
+ "No", L_End;
+L_End:
+ if (@player <= @croupier) goto L_Lost;
+ mes "\"You won! Hrm, here is your money.\"";
+ set zeny, zeny + (3 * @money);
+ close;
+
+L_No_Money:
+ mes "\"You need at least " + @money + " GP.\"";
+ close;
+
+L_Lost:
+ mes "[Werewolf]";
+ mes "\"Fine! I won!";
+ mes "You got " + @player + " with your cards.";
+ mes "I had " + @croupier + ".\"";
+ close;
+
+L_Ace:
+ set @player, @player + 11;
+ if (@player > 21) set @player, @player - 10;
+ if (@player > 21) goto L_Lost;
+ if (@player == 21) goto L_End;
+ mes "You got " + @player + " with your cards.";
+ mes "Do you want another card?";
+ next;
+
+ menu
+ "Yes", L_Another,
+ "No", L_End;
close;
L_Close: