-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
close #101 ... well, more like touch up
- Loading branch information
1 parent
bf46822
commit 6ad14e6
Showing
9 changed files
with
28 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,10 +19,12 @@ class OpExplode(val fire: Boolean) : SpellOperator { | |
val pos = args.getChecked<Vec3>(0, argc) | ||
val strength = args.getChecked<Double>(1, argc) | ||
ctx.assertVecInRange(pos) | ||
val clampedStrength = Mth.clamp(strength, 0.0, 10.0) | ||
val cost = ManaConstants.DUST_UNIT * (3 * clampedStrength + if (fire) 0.125 else 1.0) | ||
return Triple( | ||
Spell(pos, strength, this.fire), | ||
((1 + Mth.clamp(strength.toFloat(), 0f, 10f) + if (this.fire) 2 else 0) * ManaConstants.SHARD_UNIT).toInt(), | ||
listOf(ParticleSpray.burst(pos, strength, 50)) | ||
Spell(pos, clampedStrength, this.fire), | ||
cost.toInt(), | ||
listOf(ParticleSpray.burst(pos, clampedStrength, 50)) | ||
) | ||
} | ||
|
||
|
@@ -36,7 +38,7 @@ class OpExplode(val fire: Boolean) : SpellOperator { | |
pos.x, | ||
pos.y, | ||
pos.z, | ||
Mth.clamp(strength.toFloat(), 0f, 10f), | ||
strength.toFloat(), | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
gamma-delta
Author
Collaborator
|
||
this.fire, | ||
Explosion.BlockInteraction.BREAK | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
this should be clampedStrength no