implemented Orb of the Woods

This commit is contained in:
Zeno Rogue 2021-05-22 01:57:22 +02:00
parent 49ba1a7fc4
commit 698104b29c
3 changed files with 20 additions and 6 deletions

View File

@ -1687,6 +1687,10 @@ LAND(0xC0C0FF, "Cursed Land", laCursed, 0, itCursed, RESERVED,
ITEM('/', 0x211F6F, "Cursed Gold", itCursed, IC_TREASURE, ZERO, RESERVED, osNone,
"A cursed gold.")
ITEM('o', 0x208020, "Orb of the Woods", itOrbWoods, IC_ORB, ZERO, RESERVED, osTerraform,
"Lets you swap positions with the trees.")
//shmupspecials
MONSTER( '@', 0xC0C0C0, "Rogue", moPlayer, CF_FACE_UP | CF_PLAYER, RESERVED, moNone, "In the Shoot'em Up mode, you are armed with thrown Knives.")
MONSTER( '*', 0xC0C0C0, "Knife", moBullet, ZERO | CF_BULLET, RESERVED, moNone, "A simple, but effective, missile, used by rogues.")

View File

@ -146,6 +146,7 @@ EX void reduceOrbPowers() {
reduceOrbPower(itOrbPsi, 111);
reduceOrbPower(itOrbInvis, 77);
reduceOrbPower(itOrbAether, 77);
reduceOrbPower(itOrbWoods, 100);
reduceOrbPower(itOrbDigging, 100);
reduceOrbPower(itOrbTeleport, 200);
reduceOrbPower(itOrbSpace, 150);
@ -1541,6 +1542,7 @@ EX int orbcharges(eItem it) {
case itOrbFrog:
case itOrbDash:
case itOrbPhasing:
case itOrbWoods:
return 45;
case itOrb37:
case itOrbEnergy:

View File

@ -737,9 +737,14 @@ void pcmove::tell_why_cannot_attack() {
bool pcmove::after_escape() {
cell*& c2 = mi.t;
if(c2->wall == waBigStatue && !c2->monst && !nonAdjacentPlayer(c2, cwt.at) && fmsMove) {
if(!canPushStatueOn(cwt.at, P_ISPLAYER)) {
bool push_behind = c2->wall == waBigStatue || (among(c2->wall, waCTree, waSmallTree, waBigTree, waShrub, waVinePlant) && markOrb(itOrbWoods));
if(thruVine(c2, cwt.at)) push_behind = true;
if(push_behind && !c2->monst && !nonAdjacentPlayer(c2, cwt.at) && fmsMove) {
eWall what = c2->wall;
if(!thruVine(c2, cwt.at) && !canPushStatueOn(cwt.at, P_ISPLAYER)) {
if(vmsg()) {
if(isFire(cwt.at))
addMessage(XLAT("You have to escape first!"));
@ -753,11 +758,14 @@ bool pcmove::after_escape() {
changes.ccell(cwt.at);
c2->wall = cwt.at->wall;
if(doesnotFall(cwt.at))
cwt.at->wall = waBigStatue;
if(doesnotFall(cwt.at)) {
cwt.at->wall = what;
if(cellHalfvine(what))
c2->wall = waNone, cwt.at->wall = waVinePlant;
}
nextmovetype = lmMove;
addMessage(XLAT("You push %the1 behind you!", waBigStatue));
addMessage(XLAT("You push %the1 behind you!", what));
animateMovement(mi.rev(), LAYER_BOAT);
changes.push_push(cwt.at);
return perform_actual_move();