Title: | Simulate the Safari Zone from Pokemon Blue with R6 |
---|---|
Description: | An R6-class object to simulate simplified gameplay elements of the Safari Zone sub-area from Pokémon Blue (1998) using OOP. |
Authors: | Matt Dray [aut, cre] |
Maintainer: | Matt Dray <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.1 |
Built: | 2024-11-11 02:42:31 UTC |
Source: | https://github.com/matt-dray/safar6 |
Input text-string and output one character at a time given a delay. Aims to mimic the Pokemon Blue progressive text reveal, like typewriter output.
cat_tw(x, sleep = 0.02)
cat_tw(x, sleep = 0.02)
x |
A character string of length 1. |
sleep |
Numeric, length 1. System delay in seconds. |
Output to console.
## Not run: cat_typewriter("Example text.", 0.2)
## Not run: cat_typewriter("Example text.", 0.2)
A dataset containing the Pokemon you can encounter in the Safari Zone in Pokemon Blue and their statistics.
pokemon
pokemon
A data frame with 10 rows and 10 variables:
The Pokemon generation 1 game variant. BLUE
only for
now.
The area of the Safari Zone (CENTER
only for now)
The terrain on which the player is standing (GRASS
only
for now).
The encounter Pokemon's species.
The encounter Pokemon's level.
The base speed for the species.
The base speed for the species.
The base catch rate for the species.
Encounter rate slot, which determines encounter_rate
Chance of encounter.
https://github.com/pret/pokered and https://bulbapedia.bulbagarden.net/
An R6Class
object to simulate simplified gameplay elements
of the Safari Zone sub-area from Pokemon Blue (1998).
The first generation of Pokemon games were developed for the Nintendo Game Boy by Game Freak (https://www.gamefreak.co.jp/) and published by Nintendo (https://www.nintendo.com). Pokemon as a property is owned by The Pokemon Company (https://www.pokemon.co.jp/).
name
Character. Player's name.
steps
Numeric. Steps remaining (500 at start).
balls
Numeric. Safari Balls remaining (30 at start).
captures
Numeric. Count of wild Pokemon captured (0 at start).
bills_pc
Dataframe. Details of wild Pokemon caught (empty at start).
new()
Create a new Safari Zone object.
safari_zone$new()
A SafariZone
-class object.
print()
Create a new Safari Zone print method.
safari_zone$print()
A console message with steps and balls remaining.
\dontrun{ x <- safar6::safari_zone$new() # initialise class x$print() # print the object, see stats }
pause()
Simulate the pause function from the original game.
safari_zone$pause()
A console message with steps and balls remaining.
\dontrun{ x <- safar6::safari_zone$new() # intialise class x$pause() # 'pause' the game, see stats }
step()
Take a step in the Safari Zone.
safari_zone$step()
Either nothing, or a wild encounter.
\dontrun{ x <- safar6::safari_zone$new() # initialise class x$step() # take step, prints steps remaining }
clone()
The objects of this class are cloneable with this method.
safari_zone$clone(deep = FALSE)
deep
Whether to make a deep clone.
## Not run: x <- safar6::safari_zone$new() ## ------------------------------------------------ ## Method `safari_zone$print` ## ------------------------------------------------ ## Not run: x <- safar6::safari_zone$new() # initialise class x$print() # print the object, see stats ## End(Not run) ## ------------------------------------------------ ## Method `safari_zone$pause` ## ------------------------------------------------ ## Not run: x <- safar6::safari_zone$new() # intialise class x$pause() # 'pause' the game, see stats ## End(Not run) ## ------------------------------------------------ ## Method `safari_zone$step` ## ------------------------------------------------ ## Not run: x <- safar6::safari_zone$new() # initialise class x$step() # take step, prints steps remaining ## End(Not run)
## Not run: x <- safar6::safari_zone$new() ## ------------------------------------------------ ## Method `safari_zone$print` ## ------------------------------------------------ ## Not run: x <- safar6::safari_zone$new() # initialise class x$print() # print the object, see stats ## End(Not run) ## ------------------------------------------------ ## Method `safari_zone$pause` ## ------------------------------------------------ ## Not run: x <- safar6::safari_zone$new() # intialise class x$pause() # 'pause' the game, see stats ## End(Not run) ## ------------------------------------------------ ## Method `safari_zone$step` ## ------------------------------------------------ ## Not run: x <- safar6::safari_zone$new() # initialise class x$step() # take step, prints steps remaining ## End(Not run)