mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-29 13:07:40 +00:00
spaceship in turn-based mode attack is graphically represented by shooting a tiny missile, not by bumping
This commit is contained in:
17
graph.cpp
17
graph.cpp
@@ -1710,6 +1710,11 @@ EX bool drawMonsterType(eMonster m, cell *where, const shiftmatrix& V1, color_t
|
||||
return true;
|
||||
|
||||
case moBullet:
|
||||
if(getcs().charid >= 10) {
|
||||
ShadowV(V, cgi.shKnife);
|
||||
queuepoly(VBODY, cgi.shMissile, getcs().swordcolor);
|
||||
return true;
|
||||
}
|
||||
ShadowV(V, cgi.shKnife);
|
||||
queuepoly(VBODY * spin270(), cgi.shKnife, getcs().swordcolor);
|
||||
return true;
|
||||
@@ -6102,6 +6107,7 @@ struct animation {
|
||||
transmatrix attackat;
|
||||
bool mirrored;
|
||||
eItem thrown_item; /** for thrown items */
|
||||
eMonster thrown_monster; /** for thrown monsters */
|
||||
};
|
||||
|
||||
// we need separate animation layers for Orb of Domination and Tentacle+Ghost,
|
||||
@@ -6153,7 +6159,7 @@ EX void animateMovement(const movei& m, int layer) {
|
||||
a.mirrored = !a.mirrored;
|
||||
}
|
||||
|
||||
EX void animate_item_throw(cell *from, cell *to, eItem it) {
|
||||
EX void animate_item_throw(cell *from, cell *to, eItem it, eMonster mo IS(moNone)) {
|
||||
|
||||
bool steps = false;
|
||||
again:
|
||||
@@ -6169,6 +6175,7 @@ EX void animate_item_throw(cell *from, cell *to, eItem it) {
|
||||
if(steps) {
|
||||
animation& a = animations[LAYER_THROW][to];
|
||||
a.thrown_item = it;
|
||||
a.thrown_monster = mo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6188,6 +6195,14 @@ EX void animateAttack(const movei& m, int layer) {
|
||||
animateAttackOrHug(m, layer, 1, 1/3., 0);
|
||||
}
|
||||
|
||||
EX void animateCorrectAttack(const movei& m, int layer, eMonster who) {
|
||||
if(among(who, moPlayer, moMimic, moIllusion, moShadow) && getcs().charid >= 10) {
|
||||
animate_item_throw(m.s, m.t, itNone, moBullet);
|
||||
return;
|
||||
}
|
||||
animateAttackOrHug(m, layer, 1, 1/3., 0);
|
||||
}
|
||||
|
||||
EX void animateHug(const movei& m, int layer) {
|
||||
animateAttackOrHug(m, layer, 3, 0.5, -0.0713828 * cgi.scalefactor);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user