summaryrefslogtreecommitdiff
path: root/npc/functions/rebirth.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions/rebirth.txt')
-rw-r--r--npc/functions/rebirth.txt97
1 files changed, 97 insertions, 0 deletions
diff --git a/npc/functions/rebirth.txt b/npc/functions/rebirth.txt
new file mode 100644
index 00000000..3a5aac5c
--- /dev/null
+++ b/npc/functions/rebirth.txt
@@ -0,0 +1,97 @@
+// TMW scripts.
+// Authors:
+// Jesusalva
+// Hocus
+// Description:
+// Controls rebirth logic
+
+// RebirthBonus ()
+function script RebirthBonus {
+ if (PCBONUS & PCB_ATKBONUS) {
+ bonus bAtk, 25;
+ }
+ if (PCBONUS & PCB_MATKBONUS) {
+ bonus bMatk, 25;
+ }
+ if (PCBONUS & PCB_DEFBONUS) {
+ bonus bDef, 20;
+ }
+ if (PCBONUS & PCB_MDEFBONUS) {
+ bonus bMdef, 10;
+ }
+ if (PCBONUS & PCB_EVDBONUS) {
+ bonus bFlee, 20;
+ }
+ if (PCBONUS & PCB_HITBONUS) {
+ bonus bHit, 25;
+ }
+ if (PCBONUS & PCB_CRITBONUS) {
+ bonus bCritical, 5;
+ }
+ if (PCBONUS & PCB_DOUBLEATK) {
+ bonus bDoubleAddRate, 5;
+ }
+ if (PCBONUS & PCB_ALLSTATS) {
+ bonus bAllStats, 1;
+ }
+ if (PCBONUS & PCB_HPBONUS) {
+ bonus bMaxHP, 500;
+ }
+ if (PCBONUS & PCB_MPBONUS) {
+ bonus bMaxSP, 200;
+ }
+ if (PCBONUS & PCB_ASPDBONUS) {
+ bonus bAspd, 10;
+ }
+ if (PCBONUS & PCB_WSPDBONUS) {
+ bonus bSpeedAddRate, 5;
+ }
+ if (PCBONUS & PCB_WEIGHTBONUS) {
+ bonus bAddMaxWeight, 1000;
+ }
+ if (PCBONUS & PCB_EXPBONUS) {
+ bonus2 bExpAddRace, RC_All, 10;
+ }
+ if (PCBONUS & PCB_NOKNOCKBACK) {
+ bonus bNoKnockback, 1;
+ }
+ return;
+}
+
+
+// RebirthPrompt ()
+function script RebirthPrompt {
+ setnpcdialogtitle l("Rebirth Trait Selection");
+ mesc l("Please select a trait.");
+ mesc l("This choice CANNOT be undone later."), 1;
+ menuint
+ l("Cancel"), 0,
+ rif(!(PCBONUS & PCB_ATKBONUS), l("Atk +25")), PCB_ATKBONUS,
+ rif(!(PCBONUS & PCB_MATKBONUS), l("Matk +25")), PCB_MATKBONUS,
+ rif(!(PCBONUS & PCB_DEFBONUS), l("Def +20")), PCB_DEFBONUS,
+ rif(!(PCBONUS & PCB_MDEFBONUS), l("MDEF +10")), PCB_MDEFBONUS,
+ rif(!(PCBONUS & PCB_EVDBONUS), l("Evasion +20")), PCB_EVDBONUS,
+ rif(!(PCBONUS & PCB_HITBONUS), l("Accuracy +25")), PCB_HITBONUS,
+ rif(!(PCBONUS & PCB_CRITBONUS), l("Crit +5%")), PCB_CRITBONUS,
+ rif(!(PCBONUS & PCB_DOUBLEATK), l("Double Attack +5%")), PCB_DOUBLEATK,
+ rif(!(PCBONUS & PCB_ALLSTATS), l("All Stats +1")), PCB_ALLSTATS,
+ rif(!(PCBONUS & PCB_HPBONUS), l("HP +500")), PCB_HPBONUS,
+ rif(!(PCBONUS & PCB_MPBONUS), l("MP +200")), PCB_MPBONUS,
+ rif(!(PCBONUS & PCB_ASPDBONUS), l("Atk. Speed +10")), PCB_ASPDBONUS,
+ rif(!(PCBONUS & PCB_WSPDBONUS), l("Walk +5%")), PCB_WSPDBONUS,
+ rif(!(PCBONUS & PCB_WEIGHTBONUS), l("Max Weight +1kg")), PCB_WEIGHTBONUS,
+ //rif(!(PCBONUS & PCB_EXPBONUS), l("EXP Gain +10%")), PCB_EXPBONUS,
+ rif(!(PCBONUS & PCB_NOKNOCKBACK), l("Knockback Immunity")), PCB_NOKNOCKBACK;
+ if (@menuret == 0) return;
+ PCBONUS=PCBONUS|@menuret;
+ REBIRTH+=1;
+ resetlvl(3); // TODO: This makes little to no sense at rEvolt
+ setnpcdialogtitle l("Rebirth Race Selection");
+ mesc l("Do you want to change your race?");
+ mesc l("This can only be reverted at rebirth! Beware!");
+ next;
+ if (askyesno() == ASK_NO) return;
+ BarberChangeRace();
+ return;
+}
+