mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-02 04:09:16 +00:00
fixed Butterflies in non-orientable geometries
This commit is contained in:
parent
e4a38d8aa9
commit
4648780eb1
@ -354,8 +354,9 @@ EX int angledist(int t, int d1, int d2) {
|
||||
return dd;
|
||||
}
|
||||
|
||||
EX int angledistButterfly(int t, int d1, int d2) {
|
||||
EX int angledistButterfly(int t, int d1, int d2, bool mirrored) {
|
||||
int dd = d1 - d2;
|
||||
if(mirrored) dd = -dd;
|
||||
while(dd<0) dd += t;
|
||||
return dd;
|
||||
}
|
||||
@ -485,7 +486,7 @@ EX int moveval(cell *c1, cell *c2, int d, flagtype mf) {
|
||||
if(m == moBat && batsAfraid(c2)) return 790;
|
||||
|
||||
if(m == moButterfly)
|
||||
return 1500 + angledistButterfly(c1->type, c1->mondir, d);
|
||||
return 1500 + angledistButterfly(c1->type, c1->mondir, d, c1->monmirror);
|
||||
|
||||
if(m == moRagingBull && c1->mondir != NODIR)
|
||||
return 1500 - bulldist(c2);
|
||||
|
Loading…
Reference in New Issue
Block a user