Update stack.json

This commit is contained in:
Jeuv 2022-02-05 15:46:24 +01:00 committed by GitHub
parent ea48940bcb
commit 9887b7b6fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,5 @@
{
"name": "Stacks",
"name": "hexcasting.entry.stack",
"category": "hexcasting:casting",
"icon": "minecraft:piston",
"sortnum": 1,
@ -7,19 +7,19 @@
"pages": [
{
"type": "patchouli:text",
"text": "A $(thing)Stack/$, also known as a \"LIFO,\" is a concept borrowed from computer science. In short, it's a collection of things designed so that you can only interact with the most recently used thing.$(br2)Think of a stack of plates, where new plates are added to the top: if you want to interact with a plate halfway down the stack, you have to remove the plates above it in order to get a hold of it."
"text": "hexcasting.page.stack1"
},
{
"type": "patchouli:text",
"text": "Because a stack is so simple, there's only so many things you can do with it:$(li)$(italic)Adding something to it/$, known formally as pushing,$(li)$(italic)Removing the last added element/$, known as popping, or$(li)$(italic)Examining or modifying the last added element/$, known as peeking.$(br)We call the last-added element the \"top\" of the stack, in accordance with the dinner plate analogy.$(p)As an example, if we push 1 to a stack, then push 2, then pop, the top of the stack is now 1."
"text": "hexcasting.page.stack2"
},
{
"type": "patchouli:text",
"text": "Actions are (on the most part) restricted to interacting with the casting stack in these ways. They will pop some iotas they're interested in (known as \"arguments\" or \"parameters\"), process them, and push some number of results.$(br2)Of course, some actions (e.g. the $(l:patterns/basics#hexcasting:get_caster)$(action)Mind's Reflection/$) might pop no arguments, and some actions (particularly spells) might push nothing afterwards."
"text": "hexcasting.page.stack3"
},
{
"type": "patchouli:text",
"text": "Even more complicated actions can be expressed in terms of pushing, popping, and peeking. For example, the $(l:patterns/stackmanip#hexcasting:swap)$(action)Jester's Gambit/$ swaps the top two items of the stack. This can be thought of as popping two items and pushing them in opposite order. For another, $(l:patterns/stackmanip#hexcasting:duplicate)$(action)Gemini Decomposition/$ duplicates the top of the stack-- in other words, it peeks the stack and pushes a copy of what it finds."
"text": "hexcasting.page.stack4"
}
]
}