Comparing version 0.3.3 to 0.3.4
@@ -32,5 +32,6 @@ export declare type GData = { | ||
[T in ConditionName]: { | ||
bad: boolean; | ||
buff: boolean; | ||
duration: number; | ||
bad?: boolean; | ||
buff?: boolean; | ||
duration?: number; | ||
interval?: number; | ||
} & { | ||
@@ -208,72 +209,2 @@ [T in StatType]?: number; | ||
}; | ||
export declare type CharacterEntity = Entity & { | ||
bank?: BankInfo; | ||
c: { | ||
town?: { | ||
ms: number; | ||
}; | ||
}; | ||
ctype: CharacterType; | ||
items: ItemInfo[]; | ||
gold: number; | ||
goldm: number; | ||
luckm: number; | ||
ping: number; | ||
q: { | ||
compound?: {}; | ||
upgrade?: { | ||
ms: number; | ||
len: number; | ||
num: number; | ||
}; | ||
exchange?: {}; | ||
}; | ||
xrange: number; | ||
}; | ||
export declare type Entity = PositionMovable & { | ||
"1hp": number; | ||
aggro: number; | ||
apiercing: number; | ||
armor: number; | ||
attack: number; | ||
base: { | ||
"h": number; | ||
"v": number; | ||
"vn": number; | ||
}; | ||
cooperative: boolean; | ||
ctype: CharacterType | NPCType; | ||
damage_type?: DamageType; | ||
evasion: number; | ||
frequency: number; | ||
humanoid?: boolean; | ||
hp: number; | ||
id: string; | ||
immune: boolean; | ||
last_ms: Date; | ||
level: number; | ||
max_hp: number; | ||
max_mp: number; | ||
moving: boolean; | ||
mp: number; | ||
mp_cost: number; | ||
mtype?: MonsterName; | ||
name: string; | ||
npc?: string; | ||
range: number; | ||
real_x: number; | ||
real_y: number; | ||
resistance: number; | ||
rip?: boolean; | ||
rpiercing: number; | ||
s: StatusInfo; | ||
slots: SlotInfo; | ||
speed: number; | ||
standed?: any; | ||
stoned?: boolean; | ||
target: string; | ||
type: "character" | "monster"; | ||
vx: number; | ||
vy: number; | ||
}; | ||
export declare type BankInfo = { | ||
@@ -329,2 +260,5 @@ [T in Exclude<BankPackType, "gold">]?: ItemInfo[]; | ||
}; | ||
cursed?: { | ||
ms: number; | ||
}; | ||
coop?: { | ||
@@ -331,0 +265,0 @@ id: string; |
@@ -6,11 +6,16 @@ import { DamageType, GData, MapName, MonsterName, SkillName, StatusInfo } from "./definitions/adventureland"; | ||
protected G: GData; | ||
map: MapName; | ||
x: number; | ||
y: number; | ||
going_x: number; | ||
going_y: number; | ||
angle: number; | ||
moving: boolean; | ||
move_num: number; | ||
type: MonsterName; | ||
id: string; | ||
level: number; | ||
abs: boolean; | ||
angle: number; | ||
cid: number; | ||
frequency: number; | ||
going_x: number; | ||
going_y: number; | ||
move_num: any; | ||
target?: string; | ||
target: string; | ||
s: StatusInfo; | ||
@@ -20,7 +25,6 @@ abilities: { | ||
}; | ||
level: number; | ||
max_hp: number; | ||
max_mp: number; | ||
map: MapName; | ||
"1hp": boolean; | ||
aggro: number; | ||
apiercing: number; | ||
@@ -31,2 +35,3 @@ charge: number; | ||
evasion: number; | ||
frequency: number; | ||
immune: boolean; | ||
@@ -37,6 +42,5 @@ lifesteal: number; | ||
rpiercing: number; | ||
speed: number; | ||
xp: number; | ||
id: string; | ||
x: number; | ||
y: number; | ||
hp: number; | ||
mp: number; | ||
@@ -46,5 +50,3 @@ armor: number; | ||
resistance: number; | ||
hp: number; | ||
speed: number; | ||
moving: boolean; | ||
rage: number; | ||
constructor(data: EntityData, map: MapName, G: GData); | ||
@@ -51,0 +53,0 @@ updateData(data: EntityData): void; |
@@ -6,29 +6,23 @@ "use strict"; | ||
constructor(data, map, G) { | ||
this.moving = false; | ||
this["1hp"] = false; | ||
this.aggro = 0; | ||
this.apiercing = 0; | ||
this.cooperative = false; | ||
this.evasion = 0; | ||
this.immune = false; | ||
this.lifesteal = 0; | ||
this.reflection = 0; | ||
this.rpiercing = 0; | ||
this.armor = 0; | ||
this.attack = 0; | ||
this.resistance = 0; | ||
this.hp = 1; | ||
this.speed = 1; | ||
this.moving = false; | ||
this.rage = 0; | ||
this.G = G; | ||
this.abilities = G.monsters[data.type].abilities; | ||
this.level = 1; | ||
this.max_hp = G.monsters[data.type]["hp"]; | ||
this.max_mp = G.monsters[data.type]["mp"]; | ||
this.map = map; | ||
this["1hp"] = G.monsters[data.type]["1hp"]; | ||
this.apiercing = G.monsters[data.type].apiercing; | ||
this.attack = G.monsters[data.type].attack; | ||
this.cooperative = G.monsters[data.type].cooperative; | ||
this.damage_type = G.monsters[data.type].damage_type; | ||
this.evasion = G.monsters[data.type].evasion; | ||
this.frequency = G.monsters[data.type].frequency; | ||
this.hp = G.monsters[data.type].hp; | ||
this.immune = G.monsters[data.type].immune; | ||
this.mp = G.monsters[data.type].mp; | ||
this.range = G.monsters[data.type].range; | ||
this.reflection = G.monsters[data.type].reflection; | ||
this.speed = G.monsters[data.type].speed; | ||
this.xp = G.monsters[data.type].xp; | ||
this.armor = G.monsters[data.type].armor; | ||
for (const gDatum in G.monsters[data.type]) { | ||
this[gDatum] = G.monsters[data.type][gDatum]; | ||
} | ||
this.updateData(data); | ||
@@ -69,3 +63,3 @@ } | ||
if (this.s.burned) { | ||
const burnTime = Math.max(0, (this.s.burned.ms - 500)) / 1000; | ||
const burnTime = Math.max(0, (this.s.burned.ms - (this.G.conditions.burned.interval * 2))) / 1000; | ||
const burnDamage = burnTime * this.s.burned.intensity; | ||
@@ -72,0 +66,0 @@ if (burnDamage > this.hp) |
@@ -13,2 +13,8 @@ "use strict"; | ||
let baseDamage = attacker.attack; | ||
if (defender.s.cursed) { | ||
baseDamage *= 1.2; | ||
} | ||
if (defender.s.marked) { | ||
baseDamage *= 1.1; | ||
} | ||
if (attacker.ctype == "priest") | ||
@@ -15,0 +21,0 @@ baseDamage *= 0.4; |
{ | ||
"name": "alclient", | ||
"version": "0.3.3", | ||
"version": "0.3.4", | ||
"description": "A node client for interacting with Adventure Land - The Code MMORPG", | ||
@@ -5,0 +5,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
496610
6623