updates to version 6.1

This commit is contained in:
infinitefusion
2024-03-28 17:14:35 -04:00
parent e952a6f574
commit 1635409e6d
1151 changed files with 509422 additions and 5972 deletions

View File

@@ -357,6 +357,58 @@ ItemHandlers::UseFromBag.add(:DEBUGGER, proc { |item|
end
})
def useSleepingBag()
currentSecondsValue = pbGet(UnrealTime::EXTRA_SECONDS)
choices = ["1 hour", "6 hours", "12 hours", "24 hours", "Cancel"]
choice = Kernel.pbMessage("Sleep for how long?", choices, choices.length)
echoln choice
return 0 if choice == choices.length-1
oldDay = getDayOfTheWeek()
timeAdded =0
case choice
when 0
timeAdded=3600
when 1
timeAdded=21600
when 2
timeAdded=43200
when 3
timeAdded=86400
end
pbSet(UnrealTime::EXTRA_SECONDS,currentSecondsValue+timeAdded)
pbSEPlay("Sleep",100)
pbFadeOutIn {
Kernel.pbMessage(_INTL("{1} slept for a while...",$Trainer.name))
}
time = pbGetTimeNow.strftime("%I:%M %p")
newDay = getDayOfTheWeek()
if newDay != oldDay
Kernel.pbMessage(_INTL("The current time is now {1} on {2}.",time,newDay.downcase.capitalize))
else
Kernel.pbMessage(_INTL("The current time is now {1}.",time))
end
return 1
end
ItemHandlers::UseFromBag.add(:SLEEPINGBAG, proc { |item|
mapMetadata = GameData::MapMetadata.try_get($game_map.map_id)
if !mapMetadata || !mapMetadata.outdoor_map
Kernel.pbMessage(_INTL("Can't use that here..."))
next 0
end
next useSleepingBag()
})
ItemHandlers::UseInField.add(:SLEEPINGBAG, proc { |item|
mapMetadata = GameData::MapMetadata.try_get($game_map.map_id)
if !mapMetadata || !mapMetadata.outdoor_map
Kernel.pbMessage(_INTL("Can't use that here..."))
next 0
end
next useSleepingBag()
})
ItemHandlers::UseFromBag.add(:ODDKEYSTONE, proc { |item|
TOTAL_SPIRITS_NEEDED = 108
nbSpirits = pbGet(VAR_ODDKEYSTONE_NB)
@@ -1601,9 +1653,11 @@ def pbUnfuse(pokemon, scene, supersplicers, pcPosition = nil)
end
end
#On ajoute l'autre dans le pokedex aussi
#On ajoute les poke au pokedex
$Trainer.pokedex.set_seen(poke1.species)
$Trainer.pokedex.set_owned(poke1.species)
$Trainer.pokedex.set_seen(poke2.species)
$Trainer.pokedex.set_owned(poke2.species)
pokemon.species = poke1.species
pokemon.level = poke1.level