Skip to content

Instantly share code, notes, and snippets.

@Xom
Created November 12, 2022 01:04
Show Gist options
  • Save Xom/a7bd05e9135211605b83ec47138d72da to your computer and use it in GitHub Desktop.
Save Xom/a7bd05e9135211605b83ec47138d72da to your computer and use it in GitHub Desktop.
Flavor Battle prompts
The craft_desc prompt uses the word 'dangles' so that if the generation contains 'dangl', it's rejected for repetition, and the generation is retried. (On the other hand, if the output goes ' is used to cast a magical spell called', then I keep it, because the spell name is usually different. But I should probably be checking to be sure that is indeed different from 'ray of sunshine'.)
The battle_desc prompt was a stroke of luck. The problem was to generate a complete battle with a detectable end. I had been resigned to giving up soon, when out of curiosity I tried asking, Who will win the fight? Let's think step by step. The model responded with a long block of noncommital waffling, followed by:
So... who will win the fight? Let's find out!
Round 1
Disciple of the Crane vs. Snake Fist Adept
[and so on]
I edited this result to remove mentions of weapons, and rearranged the first sentence of each round to start with a word other than 'The', so that when I began the last and unfinished line of the prompt with 'The', it wouldn't repeat any of the example rounds.
Either '\nRound 2' or '\n\n' marks the end of the battle for me. (Round 2 is often generated even if someone dies in Round 1!) In both battle_desc and battle_judge, I randomize the positions of 1 and 2.
A disciple of the crane and a snake fist adept enter the arena.
The disciple of the crane is a skilled fighter at close range and far, with his hands or with any weapon. He can counter any attack with stunning speed.
The snake fist adept is a deadly monk, trained in the rapid strikes of the snake fist style. Her grace and prowess are legendary.
Round 1
Disciple of the Crane vs. Snake Fist Adept
Swinging wildly, the snake fist adept charges forward. She's fast and powerful, and she uses every ounce of strength she has to strike down her opponent. However, the disciple of the crane doesn't give up easily. As soon as the snake fist adept moves into striking distance, he shifts slightly to the left, letting her fist pass harmlessly over his head. Then he quickly spins around, grabs hold of the woman's arm, and flips her over onto her back. This leaves her stunned and vulnerable. Before she can recover, the disciple of the crane delivers a devastating blow that sends the snake fist adept flying across the room.
Round 2
Disciple of the Crane vs. Snake Fist Adept
When the snake fist adept stands up again, the disciple of the crane immediately throws a punch straight at her face. The snake fist adept dodges the blow easily, moving aside just enough to stay clear of the attack. After missing once, the disciple of the crane tries to repeat the same move, but this time the snake fist adept blocks the punch with her hand. Then, before the disciple of the crane can react, the snake fist adept grabs hold of his wrist and twists sharply. A loud crack echoes through the room as bones snap and the disciple of the crane falls to the ground unconscious.
Round 3
Disciple of the Crane vs. Snake Fist Adept
With caution, the snake fist adept approaches. She makes no attempt to attack yet, content to simply keep her enemy at bay. She holds her position for several seconds before shifting her weight to one foot. At the same moment, the disciple of the crane steps forward and lashes out. The snake fist adept barely manages to parry the blow. The sudden change in momentum causes the snake fist adept to stumble backwards. In order to regain her balance, she backflips and rebounds, attempting to catch the disciple of the crane off guard. Unfortunately, the disciple of the crane had been watching the snake fist adept closely, and he saw everything coming. His counter-move catches the snake fist adept completely off guard, sending her sprawling to the floor.
${articlizePhrase(name1, capitalize = true)} and ${articlizePhrase(name2, false)} enter the arena.
${desc1}
${desc2}
This will be a short battle.
Round 1
${titleCase(name1)} vs. ${titleCase(name2)}
The
${articlizePhrase(name1, capitalize = true)} and ${articlizePhrase(name2, false)} enter the arena.
${desc1}
${desc2}
${name1} vs. ${name2}
${battleDesc}
Winner: the
The manastone necklace dangles adorned by an ornate curling entropic gemstone.
The spell book of light is used to cast a magical spell called "ray of sunshine".
The manastone necklace and the spell book of light combine into the amulet of sunfire.
The amulet of sunfire projects a powerful ray of sunshine that its owner can control like a beacon.
${desc1}
${desc2}
The ${name1} and the ${name2} combine into the ${craftName}.
The ${craftName}
The manastone necklace is adorned by an ornate curling entropic gemstone.
The spell book of light is used to cast a magical spell called "ray of sunshine".
You upgrade the manastone necklace using the spell book of light. The manastone necklace becomes: the amulet of sunfire.
The amulet of sunfire projects a powerful ray of sunshine that can be controlled like a beacon.
${desc1}
${desc2}
You upgrade the ${name1} using the ${name2}. The ${name1} become${isSingular(name1) ? 's' : ''}: the
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment