Update Healer Man server
This commit is contained in:
1 parent
4c768fbec6
commit
b16821e92e
330 files changed
+35406
-1760
No files matched your search
@@ -0,0 +1,75 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
ROM_COA_DRUID_ADVANCED_REBIRTH_ID,
|
||||
ROM_COA_DRUID_AMULET_OF_LIGHT_ITEM_ID,
|
||||
ROM_COA_DRUID_GOLDEN_AMULET_ITEM_ID,
|
||||
ROM_COA_DRUID_REBIRTH_ID,
|
||||
ROM_COA_DRUID_SPIRIT_GUIDANCE_ID,
|
||||
ROM_COA_DRUID_SUPREME_REBIRTH_ID,
|
||||
romCoaDruidRebirthDebtRule,
|
||||
romCoaSpiritGuidanceFactionOutcome,
|
||||
} from "./romDruidCurrentCoaMechanics";
|
||||
|
||||
describe("current CoA Druid faction-conversion and Rebirth rules", () => {
|
||||
it("keeps Spirit Guidance's player-target restriction explicit", () => {
|
||||
expect(ROM_COA_DRUID_SPIRIT_GUIDANCE_ID).toBe(493536);
|
||||
expect(romCoaSpiritGuidanceFactionOutcome({
|
||||
targetKind: "player",
|
||||
casterReputation: 10,
|
||||
})).toBe("player-target-prohibited");
|
||||
});
|
||||
|
||||
it("converts an NPC only when caster reputation is nonnegative", () => {
|
||||
expect(romCoaSpiritGuidanceFactionOutcome({
|
||||
targetKind: "npc",
|
||||
casterReputation: 0,
|
||||
})).toBe("becomes-friendly");
|
||||
expect(romCoaSpiritGuidanceFactionOutcome({
|
||||
targetKind: "npc",
|
||||
casterReputation: -1,
|
||||
})).toBe("remains-hostile");
|
||||
});
|
||||
|
||||
it("does not guess the conversion result when reputation is unavailable", () => {
|
||||
expect(romCoaSpiritGuidanceFactionOutcome({
|
||||
targetKind: "npc",
|
||||
casterReputation: null,
|
||||
})).toBe("unknown-reputation");
|
||||
expect(romCoaSpiritGuidanceFactionOutcome({
|
||||
targetKind: "npc",
|
||||
casterReputation: Number.NaN,
|
||||
})).toBe("unknown-reputation");
|
||||
});
|
||||
|
||||
it("reports basic Rebirth's 30% baseline and leaves its extra amulet bonus unquantified", () => {
|
||||
expect(romCoaDruidRebirthDebtRule(ROM_COA_DRUID_REBIRTH_ID)).toEqual({
|
||||
debtReductionPercent: 30,
|
||||
itemRule: {
|
||||
kind: "optional-unquantified-bonus",
|
||||
itemIds: [ROM_COA_DRUID_GOLDEN_AMULET_ITEM_ID, ROM_COA_DRUID_AMULET_OF_LIGHT_ITEM_ID],
|
||||
},
|
||||
extraDebtReductionPercent: null,
|
||||
});
|
||||
});
|
||||
|
||||
it("maps Advanced Rebirth to 45% with its required Amulet of Light", () => {
|
||||
expect(romCoaDruidRebirthDebtRule(ROM_COA_DRUID_ADVANCED_REBIRTH_ID)).toEqual({
|
||||
debtReductionPercent: 45,
|
||||
itemRule: { kind: "required", itemId: ROM_COA_DRUID_AMULET_OF_LIGHT_ITEM_ID },
|
||||
extraDebtReductionPercent: 0,
|
||||
});
|
||||
});
|
||||
|
||||
it("maps Supreme Rebirth to 75% with its required Golden Amulet", () => {
|
||||
expect(romCoaDruidRebirthDebtRule(ROM_COA_DRUID_SUPREME_REBIRTH_ID)).toEqual({
|
||||
debtReductionPercent: 75,
|
||||
itemRule: { kind: "required", itemId: ROM_COA_DRUID_GOLDEN_AMULET_ITEM_ID },
|
||||
extraDebtReductionPercent: 0,
|
||||
});
|
||||
});
|
||||
|
||||
it("does not map unrelated or unknown spell IDs", () => {
|
||||
expect(romCoaDruidRebirthDebtRule(493538)).toBeNull();
|
||||
expect(romCoaDruidRebirthDebtRule(0)).toBeNull();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user