Skip to content

Instantly share code, notes, and snippets.

@les-peters
Created April 25, 2022 16:29
Show Gist options
  • Save les-peters/fdf3822c6ff886c70b593c1b44baa874 to your computer and use it in GitHub Desktop.
Save les-peters/fdf3822c6ff886c70b593c1b44baa874 to your computer and use it in GitHub Desktop.
Change One Letter in a Spell Name
from english_words import english_words_set
alphabet = []
for ch in range(0, 26):
alphabet.append(chr(97 + ch))
def change_a_letter(words):
letters = []
for letter in words.strip().lower():
letters.append(letter)
for i in range(0, len(letters)):
if letters[i] in alphabet:
for a in alphabet:
new_letters = []
for letter in letters:
new_letters.append(letter)
if a != letters[i]:
new_letters[i] = a
new_words = ""
for new_letter in new_letters:
new_words = new_words + new_letter
found_count = 0
for new_word in new_words.split(' '):
if new_word in english_words_set:
found_count += 1
if found_count == len(new_words.split(' ')):
dank_spells.writelines(words + " -> " + new_words + "\n")
return
spell_file = open('spelllist.txt', 'r')
spells = spell_file.readlines()
dank_spells = open('dankspells.txt', 'w')
count = 0
# Strips the newline character
for spell in spells:
change_a_letter(spell.strip().lower())
acid splash -> amid splash
acid splash -> arid splash
acid splash -> avid splash
aid -> bid
aid -> did
aid -> hid
aid -> kid
aid -> lid
aid -> mid
aid -> rid
aid -> tid
aid -> add
aid -> and
aid -> ail
aid -> aim
aid -> air
arcane eye -> arcade eye
arcane eye -> arcana eye
arcane eye -> arcane aye
arcane eye -> arcane bye
arcane eye -> arcane dye
arcane eye -> arcane lye
arcane eye -> arcane rye
arcane eye -> arcane eke
arcane eye -> arcane ere
arcane eye -> arcane eve
arcane eye -> arcane ewe
arcane lock -> arcade lock
arcane lock -> arcana lock
arcane lock -> arcane bock
arcane lock -> arcane cock
arcane lock -> arcane dock
arcane lock -> arcane hock
arcane lock -> arcane jock
arcane lock -> arcane mock
arcane lock -> arcane rock
arcane lock -> arcane sock
arcane lock -> arcane lack
arcane lock -> arcane lick
arcane lock -> arcane luck
arcane lock -> arcane look
arcane lock -> arcane loch
arcane lock -> arcane loci
beacon of hope -> deacon of hope
beacon of hope -> beacon cf hope
beacon of hope -> beacon if hope
beacon of hope -> beacon oh hope
beacon of hope -> beacon on hope
beacon of hope -> beacon or hope
beacon of hope -> beacon ow hope
beacon of hope -> beacon ox hope
beacon of hope -> beacon of cope
beacon of hope -> beacon of dope
beacon of hope -> beacon of lope
beacon of hope -> beacon of pope
beacon of hope -> beacon of rope
beacon of hope -> beacon of hole
beacon of hope -> beacon of home
beacon of hope -> beacon of hone
beacon of hope -> beacon of hose
beacon of hope -> beacon of hove
blade barrier -> glade barrier
blade barrier -> blame barrier
blade barrier -> blare barrier
blade barrier -> blaze barrier
bless -> bliss
bless -> blest
blur -> slur
blur -> blue
chain lightning -> chair lightning
charm person -> chasm person
charm person -> chard person
charm person -> chart person
charm person -> charm parson
command -> commend
commune -> commute
cone of cold -> bone of cold
cone of cold -> done of cold
cone of cold -> gone of cold
cone of cold -> hone of cold
cone of cold -> lone of cold
cone of cold -> none of cold
cone of cold -> tone of cold
cone of cold -> zone of cold
cone of cold -> cane of cold
cone of cold -> code of cold
cone of cold -> coke of cold
cone of cold -> come of cold
cone of cold -> cope of cold
cone of cold -> core of cold
cone of cold -> cove of cold
cone of cold -> conn of cold
cone of cold -> cony of cold
cone of cold -> cone cf cold
cone of cold -> cone if cold
cone of cold -> cone oh cold
cone of cold -> cone on cold
cone of cold -> cone or cold
cone of cold -> cone ow cold
cone of cold -> cone ox cold
cone of cold -> cone of bold
cone of cold -> cone of fold
cone of cold -> cone of gold
cone of cold -> cone of hold
cone of cold -> cone of mold
cone of cold -> cone of sold
cone of cold -> cone of told
cone of cold -> cone of wold
cone of cold -> cone of coed
cone of cold -> cone of cord
cone of cold -> cone of cola
cone of cold -> cone of colt
cure wounds -> cure zounds
death ward -> heath ward
death ward -> neath ward
death ward -> depth ward
death ward -> death bard
death ward -> death card
death ward -> death hard
death ward -> death lard
death ward -> death yard
death ward -> death word
death ward -> death wand
death ward -> death ware
death ward -> death warm
death ward -> death warn
death ward -> death warp
death ward -> death wart
death ward -> death wary
detect magic -> defect magic
detect magic -> deject magic
detect magic -> detent magic
detect magic -> detest magic
detect magic -> detect manic
dimension door -> dimension boor
dimension door -> dimension moor
dimension door -> dimension poor
dimension door -> dimension dour
dimension door -> dimension doom
dispel magic -> dispel manic
dominate monster -> nominate monster
dominate monster -> dominate mobster
dominate person -> nominate person
dominate person -> dominate parson
dream -> bream
dream -> cream
dream -> dread
find the path -> bind the path
find the path -> hind the path
find the path -> kind the path
find the path -> mind the path
find the path -> wind the path
find the path -> fend the path
find the path -> fond the path
find the path -> fund the path
find the path -> fine the path
find the path -> fink the path
find the path -> find she path
find the path -> find tee path
find the path -> find tie path
find the path -> find toe path
find the path -> find thy path
find the path -> find the bath
find the path -> find the hath
find the path -> find the lath
find the path -> find the math
find the path -> find the oath
find the path -> find the pith
find the path -> find the pate
finger of death -> ginger of death
finger of death -> linger of death
finger of death -> finger cf death
finger of death -> finger if death
finger of death -> finger oh death
finger of death -> finger on death
finger of death -> finger or death
finger of death -> finger ow death
finger of death -> finger ox death
finger of death -> finger of heath
finger of death -> finger of neath
finger of death -> finger of depth
fireball -> firewall
fire bolt -> dire bolt
fire bolt -> hire bolt
fire bolt -> mire bolt
fire bolt -> sire bolt
fire bolt -> tire bolt
fire bolt -> wire bolt
fire bolt -> fare bolt
fire bolt -> fore bolt
fire bolt -> fide bolt
fire bolt -> fife bolt
fire bolt -> file bolt
fire bolt -> fine bolt
fire bolt -> five bolt
fire bolt -> firm bolt
fire bolt -> fire colt
fire bolt -> fire dolt
fire bolt -> fire holt
fire bolt -> fire jolt
fire bolt -> fire molt
fire bolt -> fire volt
fire bolt -> fire belt
fire bolt -> fire boat
fire bolt -> fire boot
fire bolt -> fire bout
fire bolt -> fire bold
fire bolt -> fire bole
fire bolt -> fire bolo
fire storm -> dire storm
fire storm -> hire storm
fire storm -> mire storm
fire storm -> sire storm
fire storm -> tire storm
fire storm -> wire storm
fire storm -> fare storm
fire storm -> fore storm
fire storm -> fide storm
fire storm -> fife storm
fire storm -> file storm
fire storm -> fine storm
fire storm -> five storm
fire storm -> firm storm
fire storm -> fire store
fire storm -> fire stork
fire storm -> fire story
flame strike -> blame strike
flame strike -> frame strike
flame strike -> flake strike
flame strike -> flare strike
flame strike -> flame shrike
flame strike -> flame stroke
flame strike -> flame stride
flame strike -> flame strife
flame strike -> flame stripe
flame strike -> flame strive
fly -> ply
fly -> sly
fly -> fay
fly -> fry
fly -> flu
gate -> bate
gate -> date
gate -> fate
gate -> hate
gate -> late
gate -> mate
gate -> pate
gate -> rate
gate -> tate
gate -> gage
gate -> gale
gate -> game
gate -> gape
gate -> gave
gate -> gaze
guardian of faith -> guardian cf faith
guardian of faith -> guardian if faith
guardian of faith -> guardian oh faith
guardian of faith -> guardian on faith
guardian of faith -> guardian or faith
guardian of faith -> guardian ow faith
guardian of faith -> guardian ox faith
harm -> farm
harm -> warm
harm -> hard
harm -> hare
harm -> hark
harm -> harp
harm -> hart
haste -> baste
haste -> caste
haste -> paste
haste -> taste
haste -> waste
haste -> hasty
heal -> deal
heal -> meal
heal -> peal
heal -> real
heal -> seal
heal -> teal
heal -> veal
heal -> weal
heal -> zeal
heal -> heel
heal -> hell
heal -> head
heal -> heap
heal -> hear
heal -> heat
hold person -> bold person
hold person -> cold person
hold person -> fold person
hold person -> gold person
hold person -> mold person
hold person -> sold person
hold person -> told person
hold person -> wold person
hold person -> held person
hold person -> hood person
hold person -> hole person
hold person -> holt person
hold person -> hold parson
holy aura -> hold aura
holy aura -> hole aura
holy aura -> holt aura
ice storm -> ace storm
ice storm -> ire storm
ice storm -> icy storm
ice storm -> ice store
ice storm -> ice stork
ice storm -> ice story
identify -> identity
inflict wounds -> inflict zounds
knock -> knack
knock -> knick
lesser restoration -> lessor restoration
lesser restoration -> lessee restoration
lesser restoration -> lessen restoration
light -> eight
light -> fight
light -> might
light -> night
light -> right
light -> sight
light -> tight
lightning bolt -> lightning colt
lightning bolt -> lightning dolt
lightning bolt -> lightning holt
lightning bolt -> lightning jolt
lightning bolt -> lightning molt
lightning bolt -> lightning volt
lightning bolt -> lightning belt
lightning bolt -> lightning boat
lightning bolt -> lightning boot
lightning bolt -> lightning bout
lightning bolt -> lightning bold
lightning bolt -> lightning bole
lightning bolt -> lightning bolo
locate creature -> vocate creature
locate creature -> locale creature
mage hand -> cage hand
mage hand -> gage hand
mage hand -> page hand
mage hand -> rage hand
mage hand -> sage hand
mage hand -> wage hand
mage hand -> mace hand
mage hand -> made hand
mage hand -> make hand
mage hand -> male hand
mage hand -> mane hand
mage hand -> mare hand
mage hand -> mate hand
mage hand -> maze hand
mage hand -> magi hand
magic missile -> manic missile
magic missile -> magic fissile
magic missile -> magic missive
magic weapon -> manic weapon
major image -> manor image
major image -> mayor image
mass cure wounds -> mass cure zounds
mass heal -> bass heal
mass heal -> lass heal
mass heal -> pass heal
mass heal -> mess heal
mass heal -> miss heal
mass heal -> moss heal
mass heal -> mash heal
mass heal -> mask heal
mass heal -> mast heal
mass heal -> mass deal
mass heal -> mass meal
mass heal -> mass peal
mass heal -> mass real
mass heal -> mass seal
mass heal -> mass teal
mass heal -> mass veal
mass heal -> mass weal
mass heal -> mass zeal
mass heal -> mass heel
mass heal -> mass hell
mass heal -> mass head
mass heal -> mass heap
mass heal -> mass hear
mass heal -> mass heat
mass suggestion -> bass suggestion
mass suggestion -> lass suggestion
mass suggestion -> pass suggestion
mass suggestion -> mess suggestion
mass suggestion -> miss suggestion
mass suggestion -> moss suggestion
mass suggestion -> mash suggestion
mass suggestion -> mask suggestion
mass suggestion -> mast suggestion
maze -> daze
maze -> faze
maze -> gaze
maze -> haze
maze -> laze
maze -> raze
maze -> mace
maze -> made
maze -> make
maze -> male
maze -> mane
maze -> mare
maze -> mate
meteor swarm -> meteor swart
minor illusion -> manor illusion
minor illusion -> minot illusion
minor illusion -> minor allusion
misty step -> musty step
misty step -> misty seep
misty step -> misty stop
misty step -> misty stem
misty step -> misty stew
poison spray -> prison spray
poison spray -> poison stray
poison spray -> poison splay
power word kill -> tower word kill
power word kill -> power cord kill
power word kill -> power ford kill
power word kill -> power lord kill
power word kill -> power ward kill
power word kill -> power wold kill
power word kill -> power wood kill
power word kill -> power wore kill
power word kill -> power work kill
power word kill -> power worm kill
power word kill -> power worn kill
power word kill -> power word bill
power word kill -> power word dill
power word kill -> power word fill
power word kill -> power word gill
power word kill -> power word hill
power word kill -> power word mill
power word kill -> power word pill
power word kill -> power word rill
power word kill -> power word sill
power word kill -> power word till
power word kill -> power word will
power word stun -> tower word stun
power word stun -> power cord stun
power word stun -> power ford stun
power word stun -> power lord stun
power word stun -> power ward stun
power word stun -> power wold stun
power word stun -> power wood stun
power word stun -> power wore stun
power word stun -> power work stun
power word stun -> power worm stun
power word stun -> power worn stun
power word stun -> power word shun
power word stun -> power word spun
power word stun -> power word stub
power word stun -> power word stud
raise dead -> raise bead
raise dead -> raise head
raise dead -> raise lead
raise dead -> raise mead
raise dead -> raise read
raise dead -> raise dyad
raise dead -> raise deed
raise dead -> raise deaf
raise dead -> raise deal
raise dead -> raise dean
raise dead -> raise dear
ray of frost -> bay of frost
ray of frost -> day of frost
ray of frost -> fay of frost
ray of frost -> gay of frost
ray of frost -> hay of frost
ray of frost -> jay of frost
ray of frost -> lay of frost
ray of frost -> may of frost
ray of frost -> nay of frost
ray of frost -> pay of frost
ray of frost -> say of frost
ray of frost -> way of frost
ray of frost -> rag of frost
ray of frost -> raj of frost
ray of frost -> ram of frost
ray of frost -> ran of frost
ray of frost -> rap of frost
ray of frost -> rat of frost
ray of frost -> raw of frost
ray of frost -> ray cf frost
ray of frost -> ray if frost
ray of frost -> ray oh frost
ray of frost -> ray on frost
ray of frost -> ray or frost
ray of frost -> ray ow frost
ray of frost -> ray ox frost
ray of frost -> ray of front
regenerate -> degenerate
remove curse -> remote curse
sacred flame -> sacred blame
sacred flame -> sacred frame
sacred flame -> sacred flake
sacred flame -> sacred flare
shield of faith -> shield cf faith
shield of faith -> shield if faith
shield of faith -> shield oh faith
shield of faith -> shield on faith
shield of faith -> shield or faith
shield of faith -> shield ow faith
shield of faith -> shield ox faith
sleep -> sheep
sleep -> steep
sleep -> sweep
sleep -> sleek
sleep -> sleet
spare the dying -> scare the dying
spare the dying -> share the dying
spare the dying -> snare the dying
spare the dying -> stare the dying
spare the dying -> spire the dying
spare the dying -> spore the dying
spare the dying -> space the dying
spare the dying -> spade the dying
spare the dying -> spate the dying
spare the dying -> spark the dying
spare the dying -> spare she dying
spare the dying -> spare tee dying
spare the dying -> spare tie dying
spare the dying -> spare toe dying
spare the dying -> spare thy dying
spare the dying -> spare the hying
spare the dying -> spare the lying
spare the dying -> spare the tying
spare the dying -> spare the vying
speak with dead -> sneak with dead
speak with dead -> steak with dead
speak with dead -> speck with dead
speak with dead -> spear with dead
speak with dead -> speak pith dead
speak with dead -> speak wish dead
speak with dead -> speak with bead
speak with dead -> speak with head
speak with dead -> speak with lead
speak with dead -> speak with mead
speak with dead -> speak with read
speak with dead -> speak with dyad
speak with dead -> speak with deed
speak with dead -> speak with deaf
speak with dead -> speak with deal
speak with dead -> speak with dean
speak with dead -> speak with dear
spider climb -> spider clime
sunburst -> sunburnt
time stop -> dime stop
time stop -> lime stop
time stop -> rime stop
time stop -> tame stop
time stop -> tome stop
time stop -> tide stop
time stop -> tile stop
time stop -> tine stop
time stop -> tire stop
time stop -> time atop
time stop -> time shop
time stop -> time slop
time stop -> time step
time stop -> time stow
true seeing -> tree seeing
true seeing -> true teeing
wall of fire -> ball of fire
wall of fire -> call of fire
wall of fire -> fall of fire
wall of fire -> gall of fire
wall of fire -> hall of fire
wall of fire -> mall of fire
wall of fire -> pall of fire
wall of fire -> tall of fire
wall of fire -> well of fire
wall of fire -> will of fire
wall of fire -> wail of fire
wall of fire -> wale of fire
wall of fire -> walk of fire
wall of fire -> wall cf fire
wall of fire -> wall if fire
wall of fire -> wall oh fire
wall of fire -> wall on fire
wall of fire -> wall or fire
wall of fire -> wall ow fire
wall of fire -> wall ox fire
wall of fire -> wall of dire
wall of fire -> wall of hire
wall of fire -> wall of mire
wall of fire -> wall of sire
wall of fire -> wall of tire
wall of fire -> wall of wire
wall of fire -> wall of fare
wall of fire -> wall of fore
wall of fire -> wall of fide
wall of fire -> wall of fife
wall of fire -> wall of file
wall of fire -> wall of fine
wall of fire -> wall of five
wall of fire -> wall of firm
wall of stone -> ball of stone
wall of stone -> call of stone
wall of stone -> fall of stone
wall of stone -> gall of stone
wall of stone -> hall of stone
wall of stone -> mall of stone
wall of stone -> pall of stone
wall of stone -> tall of stone
wall of stone -> well of stone
wall of stone -> will of stone
wall of stone -> wail of stone
wall of stone -> wale of stone
wall of stone -> walk of stone
wall of stone -> wall cf stone
wall of stone -> wall if stone
wall of stone -> wall oh stone
wall of stone -> wall on stone
wall of stone -> wall or stone
wall of stone -> wall ow stone
wall of stone -> wall ox stone
wall of stone -> wall of atone
wall of stone -> wall of shone
wall of stone -> wall of stoke
wall of stone -> wall of stole
wall of stone -> wall of store
wall of stone -> wall of stove
wall of stone -> wall of stony
web -> reb
web -> wed
web -> wee
web -> wet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment