Day Care

*For details on how Pokémon in the Day Care breed, see Breeding.*

This page describes the **Day Care Center**, a place where the player can leave one or more Pokémon for a while to be trained.

The Day Care Center can also be made to function as the **Pokémon Nursery** from the newer official games.

## The Day Care

Typically, there are two people who run the Day Care Center: one who lets the player deposit and withdraw their Pokémon, and one who gives the player any Pokémon eggs that appear there.

There can only be a maximum of 2 Pokémon in the Day Care at any one time.

Any Pokémon in the Day Care will gain 1 Exp point for each step the player takes.

If a deposited Pokémon levels up and would learn a new move, but it already knows a full set of moves, then the first known move is forgotten, the rest bumped up, and the new move learned. Any move can be forgotten because of this, including HM moves.

### The Pokémon Nursery

In the newer official games, the Day Care Center is replaced by the Pokémon Nursery. The player can deposit up to two Pokémon in the Pokémon Nursery at once, and those Pokémon have a chance of breeding with each other, just like the Day Care Center. However, deposited Pokémon will not gain any Exp, but can instead share known egg moves with each other if they are the same species.

There are two settings which control whether these differences between the Day Care Center and Pokémon Nursery apply:

```
# which use the same code in Essentials.
DAY_CARE_POKEMON_GAIN_EXP_FROM_WALKING     = (MECHANICS_GENERATION <= 6)
# they are the same species.
DAY_CARE_POKEMON_CAN_SHARE_EGG_MOVES       = (MECHANICS_GENERATION >= 8)

```

In addition, the cost of the Pokémon Nursery is different to the cost of the Day Care Center:

* Day Care Center: Depositing Pokémon is free, but withdrawing them has a price (which depends on how many levels they have gained while deposited).
* Pokémon Nursery: Depositing Pokémon costs a fixed amount of money, and withdrawing them is free.

The prices of the Day Care Center/Pokémon Nursery are implemented in the NPC's event rather than in scripts, so changing them will not be described here. This is the only real difference that would need to be made to the Pokémon Nursery events; everything else described below remains the same.

## Depositing and withdrawing Pokémon

Depositing a Pokémon into the Day Care is simply a matter of choosing a Pokémon from the party when prompted. When the player withdraws a Pokémon, there is typically a fee that depends on how many levels the Pokémon has gained while in the Day Care.

To the right is a robust example of the event's contents for the Day Care person that will accept and return Pokémon. This event can also be found in the example maps. The best way to set up a Day Care person yourself is to simply copy this event, rather than spending time recreating it from scratch.

By default, the Day Care Center allows a maximum of 2 deposited Pokémon at once, but this can be changed in the scripts by changing the value of `MAX_SLOTS`. However, the limit of 2 deposited Pokémon at once is also enforced by the event's commands. If you want to change this limit, you will need to modify the event's commands accordingly.

The scripts are designed to allow only one Day Care Center by default. You may add more Day Care Centers, but you will also need to duplicate many of the helper methods such as `DayCare.get_details` and modify them to reference the added Day Care variable instead.

Shadow Pokémon can be deposited in the Day Care Center, but they cannot breed. If a Pokémon has its `cannot_store` variable set to TRUE, it cannot be deposited in the Day Care Center (this is enforced by event commands, not the scripts).

## Scripts

The Day Care Center is an instance of `class DayCare` which is stored in the variable `$PokemonGlobal.day_care`. It has a `slots` array in it, which contains a number of instances of `class DayCareSlot`. Each slot can contain one Pokémon. Each instance of the Day Care Center may individually define whether deposited Pokémon can gain Exp or share egg moves (the differences between the Day Care Center and Pokémon Nursery), but by default they adopt the settings as described above.

Each `DayCareSlot` remembers the Pokémon that is in that slot, as well as its level when it was deposited (which is used to determine the cost to withdraw it).

The following table lists the scripts associated with the Day Care:

 `DayCare.get_level_gain(slot_index, 1, 2)` | Looks at the Pokémon in the specified slot in the Day Care. If there is a Pokémon, stores its name in Game Variable 1 and the number of levels it has gained in Game Variable 2.

If there are two deposited Pokémon and the first (index 0) is withdrawn, the other deposited Pokémon will remain in the second slot (index 1). If another Pokémon is then deposited, it will be placed in the first slot, despite being newer there than the already-deposited Pokémon.

## Tips

* Give the player a phone number for the Day Care Center. The Day Care can call the player when an egg becomes available, and the player can call the Day Care to receive an update on their deposited Pokémon.
	+ Alternatively, create a Pokégear app that shows the details of the deposited Pokémon.
* It is possible to remember more information about a deposited Pokémon than just its level when the player deposited it. Perhaps you can think of some interesting things to do, such as charge more for each new move learnt (remember the initial moveset and compare it to the current one when withdrawn).
* You could change the way new moves are learned. Rather than a simple "forget the first and learn the new one", you could have the player specify a training style which prevents certain moves from being learned/forgotten (e.g. "aggressive" prefers damaging moves, "strategic" prefers status moves, etc.).
	+ Alternatively, the player could be allowed to specify certain currently-known moves that shouldn't ever be forgotten, when they deposit a Pokémon.
* Add a Move Tutor-like aspect to the Day Care. After a while, the Day Care could teach the deposited Pokémon a special move it wouldn't otherwise learn. This would be similar to the sharing of egg moves in the Pokémon Nursery.
* Have the Day Care do more to a Pokémon than just increase its Exp. How about modifying its IVs (to an extent/for a price) or its beauty?
* Have more than one Day Care Center in your game. Each Day Care could be different in a variety of ways, from accepting only certain types of Pokémon to offering a fixed training regimen (i.e. you can't withdraw a Pokémon early, but once it has gained a certain amount of Exp/levels, it will not gain any more no matter how long it stays deposited). As implied above, there are many possibilities.