From 11045f31fc2fca0391156c52b49191f4a8d4b311 Mon Sep 17 00:00:00 2001 From: beholderface Date: Sun, 23 Jun 2024 19:17:25 -0400 Subject: [PATCH] Update OpFlight.kt just a comment explaining the zero cost thing --- .../hexcasting/common/casting/actions/spells/OpFlight.kt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpFlight.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpFlight.kt index a67378dab..fcabf26d0 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpFlight.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpFlight.kt @@ -34,13 +34,9 @@ class OpFlight(val type: Type) : SpellAction { val target = args.getPlayer(0, argc) val theArg = args.getPositiveDouble(1, argc) env.assertEntityInRange(target) - - /*val cost = when (this.type) { - Type.LimitRange -> theArg * MediaConstants.DUST_UNIT - // A second of flight should cost 1 shard - Type.LimitTime -> theArg * MediaConstants.SHARD_UNIT - }.roundToLong()*/ + val cost = if (target.abilities.mayfly) { + //zero in order to not just waste media if you can already fly (see https://github.com/FallingColors/HexMod/pull/687 for some discussion) 0L } else { when (this.type) {