-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
07aed5d
commit d72af73
Showing
10 changed files
with
91 additions
and
56 deletions.
There are no files selected for viewing
41 changes: 0 additions & 41 deletions
41
common/src/main/java/miyucomics/hexical/casting/patterns/spells/OpMakeGenie.kt
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
common/src/main/java/miyucomics/hexical/casting/patterns/spells/grimoire/OpGrimoireErase.kt
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package miyucomics.hexical.casting.patterns.spells.grimoire | ||
|
||
import at.petrak.hexcasting.api.misc.MediaConstants | ||
import at.petrak.hexcasting.api.spell.* | ||
import at.petrak.hexcasting.api.spell.casting.CastingContext | ||
import at.petrak.hexcasting.api.spell.iota.Iota | ||
import at.petrak.hexcasting.api.spell.math.HexPattern | ||
import at.petrak.hexcasting.api.spell.mishaps.MishapOthersName | ||
import miyucomics.hexical.items.GrimoireItem | ||
import net.minecraft.item.ItemStack | ||
|
||
class OpGrimoireErase : SpellAction { | ||
override val argc = 1 | ||
|
||
override fun execute(args: List<Iota>, ctx: CastingContext): Triple<RenderedSpell, Int, List<ParticleSpray>> { | ||
val pattern = args.getPattern(0, argc); | ||
val (stack, _) = ctx.getHeldItemToOperateOn { it.item is GrimoireItem } | ||
return Triple(Spell(pattern, stack), 0, listOf()) | ||
} | ||
|
||
private data class Spell(val pattern: HexPattern, val stack: ItemStack) : RenderedSpell { | ||
override fun cast(ctx: CastingContext) { | ||
GrimoireItem.eraseInGrimoire(stack, pattern) | ||
} | ||
} | ||
} |
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
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
Binary file modified
BIN
-37 Bytes
(94%)
common/src/main/resources/assets/hexical/textures/item/grimoire.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions
39
...n/src/main/resources/data/hexical/patchouli_books/hexicalbook/en_us/entries/grimoire.json
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"name": "hexical.page.grimoire.title", | ||
"icon": "hexical:grimoire", | ||
"category": "hexcasting:items", | ||
"pages": [ | ||
{ | ||
"type": "patchouli:text", | ||
"text": "hexical.page.grimoire.0" | ||
}, | ||
{ | ||
"type": "patchouli:text", | ||
"text": "hexical.page.grimoire.1" | ||
}, | ||
{ | ||
"type": "patchouli:text", | ||
"text": "hexical.page.grimoire.2" | ||
}, | ||
{ | ||
"type": "patchouli:text", | ||
"text": "hexical.page.grimoire.3" | ||
}, | ||
{ | ||
"type": "hexcasting:pattern", | ||
"op_id": "hexical:write_grimoire", | ||
"anchor": "hexical:write_grimoire", | ||
"input": "pattern, [pattern]", | ||
"output": "", | ||
"text": "hexical.page.write_grimoire" | ||
}, | ||
{ | ||
"type": "hexcasting:pattern", | ||
"op_id": "hexical:erase_grimoire", | ||
"anchor": "hexical:erase_grimoire", | ||
"input": "pattern", | ||
"output": "", | ||
"text": "hexical.page.erase_grimoire" | ||
} | ||
] | ||
} |