updates
This commit is contained in:
parent
e590baf28d
commit
6382de19c9
15 changed files with 239 additions and 28 deletions
|
|
@ -374,13 +374,15 @@ export function captureMain(s: GameState, ref: AvatarRef, loc: LocId, how: Captu
|
|||
avatar(s, ref).at = loc;
|
||||
|
||||
const level = levelFor(p, loc);
|
||||
const turn1 = s.turn === 1 ? s.rules.firstTurn : null;
|
||||
const bonus = L.server === null ? 0 : (scriptOf(s.cards[L.server].name)?.ramOnPlace ?? 0);
|
||||
gainRam(s, p, s.rules.levelRam[level] + bonus, 'ramFromCaptures');
|
||||
const ram = (turn1?.captureRam === false ? 0 : s.rules.levelRam[level]) + bonus;
|
||||
gainRam(s, p, ram, 'ramFromCaptures');
|
||||
stat(s, how, p);
|
||||
const from = previous === null ? '' : ` from ${playerName(previous)}`;
|
||||
say(s, `${playerName(p)} captures ${loc}${from} (Lv ${level}) with ${L.server === null ? 'no Server' : nameOf(s, L.server)}: +${s.rules.levelRam[level] + bonus} RAM (now ${me.ram}).`);
|
||||
say(s, `${playerName(p)} captures ${loc}${from} (Lv ${level}) with ${L.server === null ? 'no Server' : nameOf(s, L.server)}: +${ram} RAM (now ${me.ram}).`);
|
||||
|
||||
if (level > me.unlockedLevel) {
|
||||
if (level > me.unlockedLevel && turn1?.unlock !== false) {
|
||||
me.unlockedLevel = level;
|
||||
me.avatars.slice(0, 4).forEach((av, i) => {
|
||||
if (i < level && !av.faceUp) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue