To start off, I want to introduce what I’m trying to create. I though it would be a fun experiment to completely re-create a Pokemon game in Inform 7. Obviously the world building is relatively simple - the tricky bit is building the stat formulas and the AI, but I’m confident!!
Anyway, my first step was to come up with a way to change a template Pokemon (a kind of animal) into any other Pokemon that I want. To do this, I’ve created an action that adjusts its stats:
Altering is an out of world action applying to one thing and one number. Understand "alter [pokemon] to [a number]" as altering.
Carry out altering:
now the Dex of the noun is the number understood;
now the Name of the noun is the tName corresponding to a tDex of the number understood in the Table of Pokemon Stats;
now the Base_HP of the noun is the tB_HP corresponding to a tDex of the number understood in the Table of Pokemon Stats;
now the Base_Atk of the noun is the tB_Atk corresponding to a tDex of the number understood in the Table of Pokemon Stats;
now the IV_HP of the noun is a random number between 0 and 31;
now the IV_Atk of the noun is a random number between 0 and 31;
now the True_Nat of the noun is a random Nature;
now the Nat_Atk of the noun is the tAtk corresponding to a tNat of the True_Nat of the noun in the Table of Pokemon Natures;
now the True_HP of the noun is ((((Base_HP * 2) + IV_HP + (EV_HP / 4)) * Level) / 100) + Level + 10;
now the True_Atk of the noun is ((((((Base_Atk * 2) + IV_Atk + (EV_Atk / 4)) * Level) / 100) + 5) * Nat_Atk) / 10.
(That’s stripped back a bit to save space, because the other 4 stats are the same formulas as Atk)
This works absolutely perfectly - I’m able to launch the game and change my template Pokemon into anything I like. The problem is, I don’t want this action to be able to be used by the player. Maybe the chances that a player will find and use that action are pretty slim, but I’d like to cover all bases. How do I make it so that I can call this action when I’m writing the story, but the player is unable to perform it when playing the game?
Thanks in advance.