115 lines
3.1 KiB
TypeScript
115 lines
3.1 KiB
TypeScript
import { DamageType } from "./damageTypes.js";
|
|
|
|
export interface IAttack {
|
|
id: Attack;
|
|
damageType: DamageType;
|
|
damageMultiplier: number;
|
|
messages: string[];
|
|
messagesDead: string[];
|
|
messagesOverpower: string[];
|
|
}
|
|
|
|
export enum Attack {
|
|
PUNCH = "PUNCH",
|
|
CUT = "CUT",
|
|
STAB = "STAB",
|
|
KICK = "KICK",
|
|
STOMP = "STOMP",
|
|
SIT = "SIT",
|
|
RIP = "RIP",
|
|
}
|
|
|
|
export const attackPunch: IAttack = {
|
|
id: Attack.PUNCH,
|
|
damageType: DamageType.PHYSICAL,
|
|
damageMultiplier: 0.5,
|
|
messages: ["ATTACKER punches DEFENDER"],
|
|
messagesDead: [
|
|
"ATTACKER punches DEFENDER to death",
|
|
"ATTACKER beats DEFENDER to death",
|
|
],
|
|
messagesOverpower: ["ATTACKER punches DEFENDER into mush"],
|
|
};
|
|
|
|
export const attackCut: IAttack = {
|
|
id: Attack.CUT,
|
|
damageType: DamageType.PHYSICAL,
|
|
damageMultiplier: 1,
|
|
messages: ["ATTACKER cuts DEFENDER"],
|
|
messagesDead: [
|
|
"ATTACKER cuts DEFENDER in half",
|
|
"ATTACKER cuts DEFENDER's head off",
|
|
"ATTACKER cuts DEFENDER, instantly killing them",
|
|
],
|
|
messagesOverpower: ["ATTACKER cuts DEFENDER in half"],
|
|
};
|
|
|
|
export const attackStab: IAttack = {
|
|
id: Attack.STAB,
|
|
damageType: DamageType.PHYSICAL,
|
|
damageMultiplier: 1.5,
|
|
messages: ["ATTACKER stabs DEFENDER"],
|
|
messagesDead: [
|
|
"ATTACKER stabs DEFENDER to death",
|
|
"ATTACKER stabs DEFENDER, instantly killing them",
|
|
],
|
|
messagesOverpower: ["ATTACKER stabs DEFENDER, instantly killing them"],
|
|
};
|
|
|
|
export const attackKick: IAttack = {
|
|
id: Attack.KICK,
|
|
damageType: DamageType.PHYSICAL,
|
|
damageMultiplier: 0.75,
|
|
messages: [
|
|
"ATTACKER kick DEFENDER",
|
|
"ATTACKER kick DEFENDER in their face",
|
|
],
|
|
messagesDead: ["ATTACKER kicks DEFENDER to death"],
|
|
messagesOverpower: ["ATTACKER kicks DEFENDER into mush"],
|
|
};
|
|
|
|
export const attackStomp: IAttack = {
|
|
id: Attack.STOMP,
|
|
damageType: DamageType.PHYSICAL,
|
|
damageMultiplier: 0.75,
|
|
messages: [
|
|
"ATTACKER stomps DEFENDER",
|
|
"ATTACKER stomps DEFENDER in their face",
|
|
],
|
|
messagesDead: ["ATTACKER stomps DEFENDER to death"],
|
|
messagesOverpower: [
|
|
"ATTACKER stomps DEFENDER into mush",
|
|
"DEFENDER explodes after ATTACKER stomps them into bloody mush",
|
|
],
|
|
};
|
|
|
|
export const attackSit: IAttack = {
|
|
id: Attack.SIT,
|
|
damageType: DamageType.PHYSICAL,
|
|
damageMultiplier: 0.65,
|
|
messages: ["ATTACKER sits on DEFENDER"],
|
|
messagesDead: ["ATTACKER sits on DEFENDER and crushes them to death"],
|
|
messagesOverpower: [
|
|
"ATTACKER sits on DEFENDER and crushes them into mush and goo",
|
|
"DEFENDER explodes after ATTACKER sits on them with their full weight",
|
|
],
|
|
};
|
|
|
|
export const attackRip: IAttack = {
|
|
id: Attack.RIP,
|
|
damageType: DamageType.PHYSICAL,
|
|
damageMultiplier: 0.3,
|
|
messages: ["ATTACKER tries to rip DEFENDER's limbs off"],
|
|
messagesDead: ["ATTACKER rips DEFENDER's head off"],
|
|
messagesOverpower: ["ATTACKER effortlessly rips DEFENDER's body in half"],
|
|
};
|
|
|
|
export const attacks = [
|
|
attackPunch,
|
|
attackCut,
|
|
attackStab,
|
|
attackKick,
|
|
attackStomp,
|
|
attackSit,
|
|
attackRip,
|
|
];
|