2020-08-21 23:35:49 +00:00
|
|
|
namespace PKHeX.Core
|
|
|
|
{
|
2020-11-27 19:51:02 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Encounter Slot found in <see cref="GameVersion.XY"/>.
|
|
|
|
/// </summary>
|
|
|
|
/// <inheritdoc cref="EncounterSlot"/>
|
2020-08-21 23:35:49 +00:00
|
|
|
public sealed class EncounterSlot6XY : EncounterSlot
|
|
|
|
{
|
|
|
|
public override int Generation => 6;
|
2020-12-22 01:05:05 +00:00
|
|
|
public bool Pressure { get; init; }
|
2020-08-21 23:35:49 +00:00
|
|
|
|
2020-08-30 18:08:21 +00:00
|
|
|
public EncounterSlot6XY(EncounterArea6XY area, int species, int form, int min, int max) : base(area)
|
2020-08-30 17:23:22 +00:00
|
|
|
{
|
|
|
|
Species = species;
|
|
|
|
Form = form;
|
|
|
|
LevelMin = min;
|
|
|
|
LevelMax = max;
|
|
|
|
}
|
|
|
|
|
2020-08-21 23:35:49 +00:00
|
|
|
protected override void SetFormatSpecificData(PKM pk)
|
|
|
|
{
|
|
|
|
var pk6 = (PK6)pk;
|
|
|
|
pk6.SetRandomMemory6();
|
|
|
|
}
|
|
|
|
|
|
|
|
public override string GetConditionString(out bool valid)
|
|
|
|
{
|
|
|
|
valid = true;
|
|
|
|
return Pressure ? LegalityCheckStrings.LEncConditionLead : LegalityCheckStrings.LEncCondition;
|
|
|
|
}
|
2020-08-30 18:08:21 +00:00
|
|
|
|
|
|
|
public EncounterSlot6XY CreatePressureFormCopy(int evoForm)
|
|
|
|
{
|
2020-12-22 01:05:05 +00:00
|
|
|
return new((EncounterArea6XY) Area, Species, evoForm, LevelMin, LevelMax) {Pressure = true};
|
2020-08-30 18:08:21 +00:00
|
|
|
}
|
2020-08-21 23:35:49 +00:00
|
|
|
}
|
2020-08-30 18:08:21 +00:00
|
|
|
}
|