1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-10 02:33:00 +00:00

dual:: if there is no effect, do no move rather than double swing

This commit is contained in:
Zeno Rogue
2019-05-29 23:09:50 +02:00
parent e99896be06
commit 5e05a0db61
2 changed files with 6 additions and 1 deletions

View File

@@ -121,11 +121,13 @@ namespace dual {
}
bool lms[2][5];
eLastmovetype lmt[2][5];
for(int k=0; k<2; k++) {
switch_to(k);
for(eForcemovetype fm: { fmMove, fmAttack, fmInstant, fmActivate }) {
forcedmovetype = fm;
lms[k][fm] = movepcto(fm == fmMove ? d : 0, subdir, true);
lmt[k][fm] = nextmovetype;
println(hlog, k, int(fm), " -> ", lms[k][fm]);
forcedmovetype = fmSkip;
for(int i=0; i<ittypes; i++) orbused[i] = orbusedbak[i];
@@ -144,6 +146,8 @@ namespace dual {
return true;
}
for(auto fm: {fmMove, fmInstant, fmAttack}) if(lms[0][fm] && lms[1][fm]) {
if(lmt[0][fm] == lmSkip && lmt[1][fm] == lmSkip)
continue;
println(hlog, "apply ", int(fm));
if(checkonly) { switch_to(cg); return true; }
int flash = items[itOrbFlash], lgt = items[itOrbLightning];