clown nose

This commit is contained in:
chardub
2025-03-25 16:37:22 -04:00
parent 4e26dbfeca
commit 37938f864b
540 changed files with 144 additions and 49 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -21,7 +21,7 @@ module Settings
FUSION_ICON_SPRITE_OFFSET = 10
#Infinite fusion settings
NB_POKEMON = 501
NB_POKEMON = 502
CUSTOM_BASE_SPRITES_FOLDER = "Graphics/CustomBattlers/local_sprites/BaseSprites/"
CUSTOM_BATTLERS_FOLDER = "Graphics/CustomBattlers/"
CUSTOM_SPRITES_TO_IMPORT_FOLDER = "Graphics/CustomBattlers/Sprites to import/"

View File

@@ -30,6 +30,7 @@ class Game_Temp
attr_accessor :loading_screen
attr_accessor :custom_sprites_list
attr_accessor :base_sprites_list
attr_accessor :corrupted_map
#-----------------------------------------------------------------------------
# * Object Initialization
@@ -59,7 +60,7 @@ class Game_Temp
@mart_prices = {}
@custom_sprites_list ={}
@base_sprites_list ={}
@corrupted_map = false
end
def clear_mart_prices

View File

@@ -5,6 +5,7 @@
# functions. Refer to "$game_map" for the instance of this class.
#==============================================================================
class Game_Map
attr_accessor :map
attr_accessor :map_id
attr_accessor :tileset_name # tileset file name
attr_accessor :autotile_names # autotile file name
@@ -89,7 +90,13 @@ class Game_Map
def updateTileset
tileset = $data_tilesets[@map.tileset_id]
tileset_corrupt = $data_tilesets[TILESET_CORRUPTED] if $game_temp.corrupted_map
@tileset_name = tileset.tileset_name
@tileset_name = tileset_corrupt.tileset_name if tileset_corrupt
@autotile_names = tileset.autotile_names
@panorama_name = tileset.panorama_name
@panorama_hue = tileset.panorama_hue

View File

@@ -53,6 +53,7 @@ def pbBGMPlay(param,volume=nil,pitch=nil)
return if !param
param=pbResolveAudioFile(param,volume,pitch)
param = pbResolveAudioFile("ultra_metropolis", volume, pitch) if darknessEffectOnCurrentMap() && !$PokemonTemp.during_battle
param = pbResolveAudioFile("corrupted", volume, pitch) if $game_temp.corrupted_map
if param.name && param.name!=""
if $game_system && $game_system.respond_to?("bgm_play")
$game_system.bgm_play(param)

View File

@@ -119,6 +119,8 @@ end
# Sets up various battle parameters and applies special rules.
def pbPrepareBattle(battle)
$PokemonGlobal.nextBattleBack = "cyber" if $game_temp.corrupted_map
battleRules = $PokemonTemp.battleRules
# The size of the battle, i.e. how many Pokémon on each side (default: "single")
battle.setBattleMode(battleRules["size"]) if !battleRules["size"].nil? || $game_switches[SWITCH_NEW_GAME_PLUS]

View File

@@ -124,7 +124,7 @@ def pbChooseSpeciesList(default = nil,max=nil)
params = ChooseNumberParams.new
max = max ? max : PBSpecies.maxValue
params.setRange(1,max)
params.setRange(-1,max)
params.setInitialValue(defaultNumber)
dexNum = pbMessageChooseNumber("dex number?",params)
return GameData::Species.get(dexNum)

View File

@@ -426,7 +426,7 @@ module Compiler
end
when "v" # Positive integer
field = csvPosInt!(rec,lineno)
raise _INTL("Field '{1}' must be greater than 0\r\n{2}",field,FileLineData.linereport) if field==0
#raise _INTL("Field '{1}' must be greater than 0\r\n{2}",field,FileLineData.linereport) if field==0
record.push(field)
when "V" # Optional positive integer
field = csvfield!(rec)

View File

@@ -389,7 +389,7 @@ module Compiler
pbEachFileSection(f) { |contents, species_number|
FileLineData.setSection(species_number, "header", nil) # For error reporting
# Raise an error if a species number is invalid or used twice
if species_number == 0
if species_number< 0
raise _INTL("A Pokémon species can't be numbered 0 ({1}).", path)
elsif GameData::Species::DATA[species_number]
raise _INTL("Species ID number '{1}' is used twice.\r\n{2}", species_number, FileLineData.linereport)

View File

@@ -502,7 +502,7 @@ module GameData
["Pig", "ignite"],
["Emb", "boar"],
["Osha", "awott"],
["De", "ewott"],
["???", "???"],
["Samu", "rott"],
["Pat", "rat"],
["Watch", "hog"],

View File

@@ -10,8 +10,8 @@ class PIFSprite
# :AUTOGEN, :CUSTOM, :BASE
def initialize(type, head_id, body_id, alt_letter = "")
@type = type
@head_id = head_id
@body_id = body_id
@head_id = get_national_dex_number(head_id)
@body_id = get_national_dex_number(body_id)
@alt_letter = alt_letter
@local_path = nil
end
@@ -44,49 +44,61 @@ class PIFSprite
echoln path
return path
end
end
def equals(other_pif_sprite)
return @type == other_pif_sprite.type &&
@head_id == other_pif_sprite.head_id &&
@body_id == other_pif_sprite.body_id &&
@alt_letter == other_pif_sprite.alt_letter &&
@local_path == other_pif_sprite.local_path
end
# little hack for old methods that expect a filename for a sprite
def to_filename()
case @type
when :CUSTOM
return "#{@head_id}.#{@body_id}#{@alt_letter}.png"
when :AUTOGEN
return "#{@head_id}.#{@body_id}.png"
when :BASE
return "#{@head_id}#{@alt_letter}.png"
def equals(other_pif_sprite)
return @type == other_pif_sprite.type &&
@head_id == other_pif_sprite.head_id &&
@body_id == other_pif_sprite.body_id &&
@alt_letter == other_pif_sprite.alt_letter &&
@local_path == other_pif_sprite.local_path
end
end
def setup_from_spritename(spritename, type)
@type = type
cleaned_name = spritename.gsub(".png", "")
if cleaned_name =~ /(\d+)\.(\d+)([a-zA-Z]*)/
head_id = $1
body_id = $2
alt_letter = $3
# little hack for old methods that expect a filename for a sprite
def to_filename()
case @type
when :CUSTOM
return "#{@head_id}.#{@body_id}#{@alt_letter}.png"
when :AUTOGEN
return "#{@head_id}.#{@body_id}.png"
when :BASE
return "#{@head_id}#{@alt_letter}.png"
end
end
@head_id = head_id
@body_id = body_id
@alt_letter = alt_letter
def setup_from_spritename(spritename, type)
@type = type
cleaned_name = spritename.gsub(".png", "")
if cleaned_name =~ /(\d+)\.(\d+)([a-zA-Z]*)/
head_id = $1
body_id = $2
alt_letter = $3
end
@head_id = head_id
@body_id = body_id
@alt_letter = alt_letter
end
def self.from_spritename(spritename, type)
obj = allocate
obj.send(:setup_from_spritename, spritename, type)
obj
end
end
def self.from_spritename(spritename, type)
obj = allocate
obj.send(:setup_from_spritename, spritename, type)
obj
#todo: use NAT_DEX_MAPPING once everything is converted
NAT_DEX_MAPPING_TEMP = {
502 => 0,
}
NAT_DEX_MAPPING_TEMP
def get_national_dex_number(internal_dex_number)
if NAT_DEX_MAPPING_TEMP.include?(internal_dex_number)
return NAT_DEX_MAPPING_TEMP[internal_dex_number]
end
return internal_dex_number
end
def new_pif_sprite_from_dex_num(type, dexNum, alt_letter)
body_id = getBodyID(dexNum)
head_id = getHeadID(dexNum, body_id)

View File

@@ -321,6 +321,7 @@ VAR_SPEED_UP_TOGGLE_SPEED=23
MAP_TEMPLATE_EVENTS = 175
TEMPLATE_EVENT_SILHOUETTE = 7
TEMPLATE_EVENT_MISSINGNO = 2
SWITCH_TRIPLE_BOSS_BATTLE = 824
SWITCH_SILVERBOSS_BATTLE = 675
@@ -329,4 +330,6 @@ GENDER_FEMALE=0
GENDER_MALE=1
MELOETTA_BAND_NAME = "Miss Melody and the Mystic Musicians"
SUCKY_BAND_NAME = "MooMoo Milk"
SUCKY_BAND_NAME = "MooMoo Milk"
TILESET_CORRUPTED =33

View File

@@ -77,6 +77,17 @@ class ClothesShopPresenter < PokemonMartScreen
playOutfitChangeAnimation()
pbMessage(_INTL("You put on the hat(s)!\\wtnp[30]"))
if hasHat?(HAT_CLOWN) && !isWearingHat(HAT_CLOWN)
$game_temp.corrupted_map=true
pbBGMPlay("corrupted")
updateTilesets
else
$game_temp.corrupted_map=false
pbBGMStop
pbBGMPlay($game_map.map.bgm)
updateTilesets
end
end
def dyeOptions(secondary_hat=false,item)

View File

@@ -1711,7 +1711,7 @@ def failAllIncompleteRocketQuests()
end
def qmarkMaskCheck()
if $Trainer.seen_qmarks_sprite
if $Trainer.seen_qmarks_sprite || $game_temp.corrupted_map
unless hasHat?(HAT_QMARKS)
obtainHat(HAT_QMARKS)
obtainClothes(CLOTHES_GLITCH)

View File

@@ -51,9 +51,9 @@ end
def loadDateSpecificChanges()
current_date = Time.new
if (current_date.day == 1 && current_date.month == 4)
#if (current_date.day == 1 && current_date.month == 4)
$Trainer.hat2=HAT_CLOWN if $Trainer.unlocked_hats.include?(HAT_CLOWN)
end
#end
end
def onStartingNewGame() end

View File

@@ -61,6 +61,24 @@ Events.onMapChange += proc { |sender, e|
}
Events.onStepTaken += proc { |sender, e|
next if !$scene.is_a?(Scene_Map)
next if !$game_temp.corrupted_map
steps_chance=255
minimum_steps=14
steps_nb = rand(steps_chance)
steps_nb = minimum_steps if steps_nb<minimum_steps
next if $PokemonGlobal.stepcount % steps_nb != 0
$PokemonTemp.pbClearSilhouetteEvents
spawnMissingno()
}
Events.onMapChange += proc { |sender, e|
next if $PokemonTemp.tempEvents.empty?
$PokemonTemp.pbClearTempEvents()
}
def getRandomPositionOnPerimeter(width, height, center_x, center_y, variance=0,edge=nil)
half_width = width / 2.0
half_height = height / 2.0
@@ -115,6 +133,14 @@ def generate_silhouette_event(id)
return new_event
end
def generate_missingno_event(id)
template_event = $MapFactory.getMap(MAP_TEMPLATE_EVENTS,false).events[TEMPLATE_EVENT_MISSINGNO]
new_event= template_event.event.dup
new_event.name = "temp_missingno"
new_event.id = id
return new_event
end
def spawnSilhouette()
found_available_position = false
max_tries = 10
@@ -144,4 +170,36 @@ def spawnSilhouette()
$scene.spritesets[$game_map.map_id] = Spriteset_Map.new($game_map) if $scene.spritesets[$game_map.map_id] == nil
$scene.spritesets[$game_map.map_id].character_sprites.push(sprite)
#$PokemonTemp.addTempEvent($game_map.map_id, gameEvent)
end
def spawnMissingno()
found_available_position = false
max_tries = 10
current_try = 0
while !found_available_position
x, y = getRandomPositionOnPerimeter(15, 11, $game_player.x, $game_player.y, 2)
found_available_position = true if $game_map.passable?(x, y, $game_player.direction)
current_try += 1
return if current_try > max_tries
end
key_id = ($game_map.events.keys.max || -1) + 1
rpgEvent = generate_missingno_event(key_id)
#rpgEvent = RPG::Event.new(x,y)
gameEvent = Game_Event.new($game_map.map_id, rpgEvent, $game_map)
direction = DIRECTION_DOWN #[2,4,6,8].sample
gameEvent.direction = direction
$PokemonTemp.silhouetteDirection = direction
$game_map.events[key_id] = gameEvent
gameEvent.moveto(x, y)
#-------------------------------------------------------------------------
#updating the sprites
sprite = Sprite_Character.new(Spriteset_Map.viewport, $game_map.events[key_id])
$scene.spritesets[$game_map.map_id] = Spriteset_Map.new($game_map) if $scene.spritesets[$game_map.map_id] == nil
$scene.spritesets[$game_map.map_id].character_sprites.push(sprite)
#$PokemonTemp.addTempEvent($game_map.map_id, gameEvent)
end

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -2355,9 +2355,9 @@ thesemoves=[]
maxValue=[maxValue,currentmap].max
sectionDisplay=currentmap.to_s
next if hash[key][0]<0
if currentmap==0
raise _INTL("A Pokemon species can't be numbered 0 (PBS/pokemon.txt)")
end
#if currentmap==0
# raise _INTL("A Pokemon species can't be numbered 0 (PBS/pokemon.txt)")
#end
if !lastsection[key] || lastsection[key]==""
raise _INTL("Required entry {1} is missing or empty in section {2} (PBS/pokemon.txt)",key,sectionDisplay) if hash==requiredtypes
next

Binary file not shown.

Binary file not shown.