summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/002-1/peter.txt2
-rw-r--r--npc/020-1/trainer.txt26
-rw-r--r--npc/items/mercenary.txt45
3 files changed, 71 insertions, 2 deletions
diff --git a/npc/002-1/peter.txt b/npc/002-1/peter.txt
index 0d5af2fd2..bff153067 100644
--- a/npc/002-1/peter.txt
+++ b/npc/002-1/peter.txt
@@ -269,7 +269,7 @@ OnDone:
mesn;
mesq l("Good job!") + " " + l("Thanks for helping!");
getexp 0, (JobLevel > 6 ? (15+JobLevel) : 4);
- PETER_REPEAT += 1
+ PETER_REPEAT += 1;
// Every 3 repeats (10 minutes) gives you 50 GP
if (PETER_REPEAT % 3 == 0) {
diff --git a/npc/020-1/trainer.txt b/npc/020-1/trainer.txt
index e1b2a778e..1fb4774ac 100644
--- a/npc/020-1/trainer.txt
+++ b/npc/020-1/trainer.txt
@@ -96,7 +96,31 @@ L_Main:
break;
// Evolve Card
case 3:
- mesc l("ERROR: Unimplemented Function"), 1;
+ mesn;
+ mesq l("Give me %s cards of the same type, and I'll give you one card of a higher rarity. There is no cost, but the card is random.", b(l("three")));
+ next;
+ mes "##B" + l("Drag and drop an item from your inventory.") + "##b";
+
+ .@card = requestitem();
+ if (.@card <= 1) break;
+ if (countitem(.@card) < 3) {
+ mesc l("You need at least %d cards of same kind.", 3), 1;
+ break;
+ }
+ .@st = merc_getstar(.@card);
+ if (.@st < 1 || .@st >= 5) {
+ mesc l("This cannot be evolved."), 1;
+ break;
+ }
+ delitem .@card, 3;
+ merc_boxset(
+ (.@st == 4 ? 1000 : 0),
+ (.@st == 3 ? 1000 : 0),
+ (.@st == 2 ? 1000 : 0),
+ (.@st == 1 ? 1000 : 0),
+ 0);
+ mesn;
+ mesq l("Here you go! Wasn't this a sweet deal?");
break;
// Leave
default:
diff --git a/npc/items/mercenary.txt b/npc/items/mercenary.txt
index ea7f1389a..140d3887b 100644
--- a/npc/items/mercenary.txt
+++ b/npc/items/mercenary.txt
@@ -103,3 +103,48 @@ function script merc_randid {
return .@n;
}
+// Read the card and return its rarity
+// merc_getstar(card)
+function script merc_getstar {
+ switch (getarg(0)) {
+ case MercBoxE:
+ case MercBoxEE:
+ case MercCard_AndreiSakar:
+ case MercCard_Lilanna:
+ case MercCard_Woody:
+ case MercCard_Xanthem:
+ return 5;
+ case MercBoxD:
+ case MercBoxDD:
+ case MercCard_Aisen:
+ case MercCard_Msawis:
+ case MercCard_DragonStar:
+ case MercCard_Swezanne:
+ return 4;
+ case MercBoxC:
+ case MercBoxCC:
+ case MercCard_Saulc:
+ case MercCard_Crazyfefe:
+ case MercCard_LawnCable:
+ case MercCard_Arthur:
+ return 3;
+ case MercBoxB:
+ case MercBoxBB:
+ case MercCard_Pookie:
+ case MercCard_Jesusalva:
+ case MercCard_Demure:
+ case MercCard_EarthWitch:
+ return 2;
+ case MercBoxA:
+ case MercBoxAA:
+ case MercCard_Apane:
+ case MercCard_Soren:
+ case MercCard_GonzoDark:
+ case MercCard_Rosa:
+ return 1;
+ default:
+ return 0;
+ }
+ return -1;
+}
+