Skip to content

Commit

Permalink
Finished documentation, added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
miyucomics committed Feb 21, 2024
1 parent f96c8a4 commit 4ca1453
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@ import at.petrak.hexcasting.xplat.IXplatAbstractions
class OpProgramLamp : SpellAction {
override val argc = 1

// Right now, this pattern is extremely overpowered
// Later it'll be specialized to program only the lamp
// But for debug purposes, it lets you program any casting item for free
// And even gives you ten thousand crystals worth of media as a bonus
override fun execute(args: List<Iota>, ctx: CastingContext): Triple<RenderedSpell, Int, List<ParticleSpray>> {
val patterns = args.getList(0, argc).toList()
return Triple(Spell(patterns), 3 * MediaConstants.DUST_UNIT, listOf())
return Triple(Spell(patterns), 0, listOf())
}

private data class Spell(val patterns: List<Iota>) : RenderedSpell {
override fun cast(ctx: CastingContext) {
val (handStack, _) = ctx.getHeldItemToOperateOn { IXplatAbstractions.INSTANCE.findHexHolder(it) != null }
IXplatAbstractions.INSTANCE.findHexHolder(handStack)?.writeHex(patterns, 100000)
IXplatAbstractions.INSTANCE.findHexHolder(handStack)?.writeHex(patterns, MediaConstants.CRYSTAL_UNIT * 10000)
}
}
}
3 changes: 2 additions & 1 deletion common/src/main/resources/assets/hexical/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

"hexical.page.hexical_metaevals": "Hexical Metaevaluations",
"hexcasting.spell.hexical:nephthys": "Nephthys Gambit",
"hexical.page.nephthys": "Pops a pattern list and a number from the stack and dives down n iota to casts the pattern list. Useful for surgery-like operations. It's extremely versatile and I can mend almost any error in my stack using Bookkeeper's Gambit, pushing iota after a dive, and transforming surfaced iota. It was named after a goddess of mourning and rivers, lending to how it buries/dives down into the stack.",
"hexical.page.nephthys.1": "Pops a pattern list and a number from the stack and dives down n iota to casts the pattern list. Useful for surgery-like operations.",
"hexical.page.nephthys.2": "It's extremely versatile and I can mend almost any error in my stack using Bookkeeper's Gambit, pushing iota after a dive, and transforming surfaced iota. It was named after a goddess of mourning and rivers, lending to how it buries/dives down into the stack.",

"hexical.category.hexomancy": "Hexomancy",
"hexical.category.hexomancy.desc": "I feel strangely more receptive of the ambient media around me. I can even feel it responding to certain tasks I perform, as if suggesting spells to me. Because I am essentially divining spells from the media, I shall call it hexomancy.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@
"type": "hexcasting:pattern",
"op_id": "hexical:nephthys",
"anchor": "hexical:nephthys",
"input": "list of patterns, number",
"output": "varies",
"text": "hexical.page.nephthys"
"input": "list of patterns, num",
"output": "vary",
"text": "hexical.page.nephthys.1"
},
{
"type": "patchouli:text",
"text": "hexical.page.nephthys.2"
}
]
}

0 comments on commit 4ca1453

Please sign in to comment.