Skip to content

Commit

Permalink
Update OpFlight.kt
Browse files Browse the repository at this point in the history
just a comment explaining the zero cost thing
  • Loading branch information
beholderface authored Jun 23, 2024
1 parent 8673a9d commit 11045f3
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 11045f3

Please sign in to comment.