HexMod icon indicating copy to clipboard operation
HexMod copied to clipboard

Make flight spells cost zero if the target can already fly

Open beholderface opened this issue 1 year ago • 8 comments

Because I made a wisp capable of applying Anchorite's Flight on a regular basis, then realized that it would just be wasting media most of the time. IMO the ideal solution to this would be to make the flight spells overwrite flight abilities applied by hex (but not any others), but I don't know how one would do that.

beholderface avatar Jun 18 '24 18:06 beholderface

uh, wouldn't this just make it free to infinitely move Anchorite's around with you forever? that seems a bit broken

object-Object avatar Jun 18 '24 18:06 object-Object

No, because it still doesn't overwrite any existing flight, and as such you'd need to exit the flight radius before it would do anything, thus making it have nonzero cost.

beholderface avatar Jun 18 '24 18:06 beholderface

honestly I feel like this could apply... but only to wayfarers so that you could eg: deploy anchorites anywhere (and it is on you if they overlap (space or time wise)

walksanatora avatar Jun 20 '24 02:06 walksanatora

that or mabey instead of making it zero it would add time to existing wayfarers flight? (or mabey set time to that and not consume the whole ammount of media for time remaining?)

walksanatora avatar Jun 20 '24 02:06 walksanatora

If we want to make it overwrite an existing flight instead of setting the cost to 0 and silently failing, we could instead change this condition:

https://github.com/FallingColors/HexMod/blob/f1b0e8919a755e3738ee50436bae22d1193e05ec/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpFlight.kt#L69-L73

to something like this:

  if (target.abilities.mayfly && IXplatAbstractions.INSTANCE.getFlight() == null) { 
     // Don't accidentally clobber someone else's non-Hex flight 
     // TODO make this a mishap? 
     return 
 } 

object-Object avatar Jun 23 '24 20:06 object-Object

I've dealt with the tweaks suggested in object's review, I haven't yet done anything to do with overriding flight since it's still under discussion

beholderface avatar Jun 23 '24 23:06 beholderface

I'd throw a mishap.

gamma-delta avatar Aug 23 '24 02:08 gamma-delta

I think we decided on Discord that a good way to fix this would be to make both flight patterns mishap if the target can already fly, and also make a pattern to check if an entity can currently fly.

object-Object avatar Aug 23 '24 20:08 object-Object

We could also just have it waste the media ... design a more careful hex if you want infinite flight. I'm OK on just closing this and leaving the behavior as-is, we're so close to release

gamma-delta avatar Nov 13 '24 17:11 gamma-delta