Skip to content

Commit

Permalink
New game event keep_custom_psynergy property.
Browse files Browse the repository at this point in the history
  • Loading branch information
jjppof committed Mar 7, 2024
1 parent 90dc667 commit 408485d
Show file tree
Hide file tree
Showing 75 changed files with 331 additions and 124 deletions.
4 changes: 2 additions & 2 deletions base/game_events/AddItemToPartyEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ export class AddItemToPartyEvent extends GameEvent {
private item_key: string;
private quantity: number;

constructor(game, data, active, key_name, keep_reveal, item_key, quantity) {
super(game, data, event_types.ADD_ITEM_TO_PARTY, active, key_name, keep_reveal);
constructor(game, data, active, key_name, keep_reveal, keep_custom_psynergy, item_key, quantity) {
super(game, data, event_types.ADD_ITEM_TO_PARTY, active, key_name, keep_reveal, keep_custom_psynergy);
this.item_key = item_key;
this.quantity = quantity ?? 1;
}
Expand Down
3 changes: 2 additions & 1 deletion base/game_events/AudioPlayEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export class AudioPlayEvent extends GameEvent {
active,
key_name,
keep_reveal,
keep_custom_psynergy,
audio_type,
audio_key,
volume,
Expand All @@ -31,7 +32,7 @@ export class AudioPlayEvent extends GameEvent {
bgm_identifier,
finish_events
) {
super(game, data, event_types.AUDIO_PLAY, active, key_name, keep_reveal);
super(game, data, event_types.AUDIO_PLAY, active, key_name, keep_reveal, keep_custom_psynergy);
this.audio_type = audio_type;
this.audio_key = audio_key;
this.volume = volume ?? 1.0;
Expand Down
4 changes: 2 additions & 2 deletions base/game_events/AudioStopEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ export class AudioStopEvent extends GameEvent {
private fade_out: boolean;
private bgm_identifier: string;

constructor(game, data, active, key_name, keep_reveal, pause_only, fade_out, bgm_identifier) {
super(game, data, event_types.AUDIO_STOP, active, key_name, keep_reveal);
constructor(game, data, active, key_name, keep_reveal, keep_custom_psynergy, pause_only, fade_out, bgm_identifier) {
super(game, data, event_types.AUDIO_STOP, active, key_name, keep_reveal, keep_custom_psynergy);
this.pause_only = pause_only;
this.fade_out = fade_out;
this.bgm_identifier = bgm_identifier;
Expand Down
3 changes: 2 additions & 1 deletion base/game_events/BattleEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export class BattleEvent extends GameEvent {
active,
key_name,
keep_reveal,
keep_custom_psynergy,
background_key,
enemy_party_key,
return_to_sanctum,
Expand All @@ -35,7 +36,7 @@ export class BattleEvent extends GameEvent {
before_fade_victory_events,
before_fade_defeat_events
) {
super(game, data, event_types.BATTLE, active, key_name, keep_reveal);
super(game, data, event_types.BATTLE, active, key_name, keep_reveal, keep_custom_psynergy);
this.background_key = background_key;
this.enemy_party_key = enemy_party_key;
this.return_to_sanctum = return_to_sanctum ?? true;
Expand Down
15 changes: 13 additions & 2 deletions base/game_events/BranchEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,19 @@ export class BranchEvent extends GameEvent {
private events: GameEvent[] = [];
private else_events: GameEvent[] = [];

constructor(game, data, active, key_name, keep_reveal, combination, comparator_pairs, events, else_events) {
super(game, data, event_types.BRANCH, active, key_name, keep_reveal);
constructor(
game,
data,
active,
key_name,
keep_reveal,
keep_custom_psynergy,
combination,
comparator_pairs,
events,
else_events
) {
super(game, data, event_types.BRANCH, active, key_name, keep_reveal, keep_custom_psynergy);
this.combination = combination ?? combinations.OR;
this.comparator_pairs = comparator_pairs ?? [];
this.initialize_events(events, else_events);
Expand Down
15 changes: 13 additions & 2 deletions base/game_events/CameraFadeEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,19 @@ export class CameraFadeEvent extends GameEvent {
private duration: number;
private color: string;

constructor(game, data, active, key_name, keep_reveal, fade_type, duration, color, finish_events) {
super(game, data, event_types.CAMERA_FADE, active, key_name, keep_reveal);
constructor(
game,
data,
active,
key_name,
keep_reveal,
keep_custom_psynergy,
fade_type,
duration,
color,
finish_events
) {
super(game, data, event_types.CAMERA_FADE, active, key_name, keep_reveal, keep_custom_psynergy);
this.fade_type = fade_type;
this.duration = duration ?? 500;
this.color = color;
Expand Down
3 changes: 2 additions & 1 deletion base/game_events/CameraFollowEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ export class CameraFollowEvent extends GameEvent {
active,
key_name,
keep_reveal,
keep_custom_psynergy,
follow,
is_hero,
npc_label,
io_label,
transition_duration,
transition_end_events
) {
super(game, data, event_types.CAMERA_FOLLOW, active, key_name, keep_reveal);
super(game, data, event_types.CAMERA_FOLLOW, active, key_name, keep_reveal, keep_custom_psynergy);
this.follow = follow ?? true;
this.is_hero = is_hero ?? true;
this.npc_label = npc_label;
Expand Down
3 changes: 2 additions & 1 deletion base/game_events/CameraMoveEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ export class CameraMoveEvent extends GameEvent {
active,
key_name,
keep_reveal,
keep_custom_psynergy,
positions,
reset_follow,
return_to_target_duration,
finish_events
) {
super(game, data, event_types.CAMERA_MOVE, active, key_name, keep_reveal);
super(game, data, event_types.CAMERA_MOVE, active, key_name, keep_reveal, keep_custom_psynergy);
this.positions = positions ?? [];
this.reset_follow = reset_follow ?? false;
this.return_to_target_duration = return_to_target_duration ?? 0;
Expand Down
4 changes: 2 additions & 2 deletions base/game_events/CameraShakeEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import {GameEvent, event_types} from "./GameEvent";
export class CameraShakeEvent extends GameEvent {
private enable: boolean;

constructor(game, data, active, key_name, keep_reveal, enable) {
super(game, data, event_types.CAMERA_SHAKE, active, key_name, keep_reveal);
constructor(game, data, active, key_name, keep_reveal, keep_custom_psynergy, enable) {
super(game, data, event_types.CAMERA_SHAKE, active, key_name, keep_reveal, keep_custom_psynergy);
this.enable = enable;
}

Expand Down
4 changes: 2 additions & 2 deletions base/game_events/CastingAuraEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export class CastingAuraEvent extends GameEvent {
private npc_label: string;
private enable: boolean;

constructor(game, data, active, key_name, keep_reveal, is_npc, npc_label, enable) {
super(game, data, event_types.CASTING_AURA, active, key_name, keep_reveal);
constructor(game, data, active, key_name, keep_reveal, keep_custom_psynergy, is_npc, npc_label, enable) {
super(game, data, event_types.CASTING_AURA, active, key_name, keep_reveal, keep_custom_psynergy);
this.npc_label = npc_label;
this.is_npc = is_npc;
this.enable = enable;
Expand Down
4 changes: 2 additions & 2 deletions base/game_events/ChangeCollisionLayerEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import {GameEvent, event_types} from "./GameEvent";
export class ChangeCollisionLayerEvent extends GameEvent {
private target_collision_layer: number;

constructor(game, data, active, key_name, keep_reveal, target_collision_layer) {
super(game, data, event_types.CHANGE_COLLISION_LAYER, active, key_name, keep_reveal);
constructor(game, data, active, key_name, keep_reveal, keep_custom_psynergy, target_collision_layer) {
super(game, data, event_types.CHANGE_COLLISION_LAYER, active, key_name, keep_reveal, keep_custom_psynergy);
this.target_collision_layer = target_collision_layer;
}

Expand Down
3 changes: 2 additions & 1 deletion base/game_events/CharAnimPlayEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export class CharAnimPlayEvent extends GameEvent {
active,
key_name,
keep_reveal,
keep_custom_psynergy,
is_npc,
npc_label,
action,
Expand All @@ -29,7 +30,7 @@ export class CharAnimPlayEvent extends GameEvent {
reset_before_start,
finish_events
) {
super(game, data, event_types.CHAR_ANIMATION_PLAY, active, key_name, keep_reveal);
super(game, data, event_types.CHAR_ANIMATION_PLAY, active, key_name, keep_reveal, keep_custom_psynergy);
this.npc_label = npc_label;
this.is_npc = is_npc;
this.action = action;
Expand Down
4 changes: 2 additions & 2 deletions base/game_events/CharBlendModeEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ export class CharBlendModeEvent extends GameEvent {
private npc_label: string;
private blend_mode: string;

constructor(game, data, active, key_name, keep_reveal, is_npc, npc_label, blend_mode) {
super(game, data, event_types.CHAR_BLEND_MODE, active, key_name, keep_reveal);
constructor(game, data, active, key_name, keep_reveal, keep_custom_psynergy, is_npc, npc_label, blend_mode) {
super(game, data, event_types.CHAR_BLEND_MODE, active, key_name, keep_reveal, keep_custom_psynergy);
this.blend_mode = blend_mode ?? "normal";
this.is_npc = is_npc;
this.npc_label = npc_label;
Expand Down
3 changes: 2 additions & 1 deletion base/game_events/CharFallEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export class CharFallEvent extends GameEvent {
active,
key_name,
keep_reveal,
keep_custom_psynergy,
is_npc,
npc_label,
y_destination_position,
Expand All @@ -24,7 +25,7 @@ export class CharFallEvent extends GameEvent {
teleport,
finish_events
) {
super(game, data, event_types.CHAR_FALL, active, key_name, keep_reveal);
super(game, data, event_types.CHAR_FALL, active, key_name, keep_reveal, keep_custom_psynergy);
this.is_npc = is_npc;
this.npc_label = npc_label;
this.options = {
Expand Down
4 changes: 2 additions & 2 deletions base/game_events/CharHueEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export class CharHueEvent extends GameEvent {
private enable: boolean;
private angle: number;

constructor(game, data, active, key_name, keep_reveal, is_npc, npc_label, enable, angle) {
super(game, data, event_types.CHAR_HUE, active, key_name, keep_reveal);
constructor(game, data, active, key_name, keep_reveal, keep_custom_psynergy, is_npc, npc_label, enable, angle) {
super(game, data, event_types.CHAR_HUE, active, key_name, keep_reveal, keep_custom_psynergy);
this.enable = enable ?? true;
this.angle = angle ?? -1.0;
this.is_npc = is_npc;
Expand Down
3 changes: 2 additions & 1 deletion base/game_events/CharItemManipulationEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export class CharItemManipulationEvent extends GameEvent {
active,
key_name,
keep_reveal,
keep_custom_psynergy,
char_key,
control_type,
item_key,
Expand All @@ -37,7 +38,7 @@ export class CharItemManipulationEvent extends GameEvent {
manipulation_done_events,
manipulation_fail_events
) {
super(game, data, event_types.CHAR_ITEM_MANIPULATION, active, key_name, keep_reveal);
super(game, data, event_types.CHAR_ITEM_MANIPULATION, active, key_name, keep_reveal, keep_custom_psynergy);
this.char_key = char_key;
this.control_type = control_type;
this.item_key = item_key;
Expand Down
4 changes: 2 additions & 2 deletions base/game_events/CharLevelChangeEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ export class CharLevelChangeEvent extends GameEvent {
private target_char_key: string;
private target_level_value: number;

constructor(game, data, active, key_name, keep_reveal, target_char_key, target_level_value) {
super(game, data, event_types.CHAR_LEVEL_CHANGE, active, key_name, keep_reveal);
constructor(game, data, active, key_name, keep_reveal, keep_custom_psynergy, target_char_key, target_level_value) {
super(game, data, event_types.CHAR_LEVEL_CHANGE, active, key_name, keep_reveal, keep_custom_psynergy);
this.target_char_key = target_char_key;
this.target_level_value = target_level_value;
}
Expand Down
3 changes: 2 additions & 1 deletion base/game_events/CharRotationEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ export class CharRotationEvent extends GameEvent {
active,
key_name,
keep_reveal,
keep_custom_psynergy,
is_npc,
npc_label,
rotate,
interframe_interval,
frame_index
) {
super(game, data, event_types.CHAR_ROTATION, active, key_name, keep_reveal);
super(game, data, event_types.CHAR_ROTATION, active, key_name, keep_reveal, keep_custom_psynergy);
this.is_npc = is_npc;
this.npc_label = npc_label;
this.rotate = rotate;
Expand Down
4 changes: 2 additions & 2 deletions base/game_events/CharShadowVisibilityEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ export class CharShadowVisibilityEvent extends GameEvent {
private npc_label: string;
private visible: boolean;

constructor(game, data, active, key_name, keep_reveal, is_npc, npc_label, visible) {
super(game, data, event_types.CHAR_SHADOW_VISIBILITY, active, key_name, keep_reveal);
constructor(game, data, active, key_name, keep_reveal, keep_custom_psynergy, is_npc, npc_label, visible) {
super(game, data, event_types.CHAR_SHADOW_VISIBILITY, active, key_name, keep_reveal, keep_custom_psynergy);
this.is_npc = is_npc;
this.npc_label = npc_label;
this.visible = visible;
Expand Down
3 changes: 2 additions & 1 deletion base/game_events/CharTweenPositionEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export class CharTweenPositionEvent extends GameEvent {
active,
key_name,
keep_reveal,
keep_custom_psynergy,
is_npc,
npc_label,
duration,
Expand All @@ -41,7 +42,7 @@ export class CharTweenPositionEvent extends GameEvent {
shadow_follow_char,
keep_char_collision_disable
) {
super(game, data, event_types.CHAR_TWEEN_POSITION, active, key_name, keep_reveal);
super(game, data, event_types.CHAR_TWEEN_POSITION, active, key_name, keep_reveal, keep_custom_psynergy);
this.is_npc = is_npc;
this.npc_label = npc_label;
this.duration = duration;
Expand Down
3 changes: 2 additions & 1 deletion base/game_events/ChestEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export class ChestEvent extends GameEvent {
active,
key_name,
keep_reveal,
keep_custom_psynergy,
item_key_name,
quantity,
finish_events,
Expand All @@ -41,7 +42,7 @@ export class ChestEvent extends GameEvent {
hide_on_finish,
standard_chest
) {
super(game, data, event_types.CHEST, active, key_name, keep_reveal);
super(game, data, event_types.CHEST, active, key_name, keep_reveal, keep_custom_psynergy);
this.item = this.data.info.items_list[item_key_name];
this.quantity = quantity ?? 1;
this.no_chest = no_chest ?? false;
Expand Down
16 changes: 14 additions & 2 deletions base/game_events/ColorizeCharEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,20 @@ export class ColorizeCharEvent extends GameEvent {
private intensity: number;
private gray: number;

constructor(game, data, active, key_name, keep_reveal, is_npc, npc_label, color_key, intensity, gray) {
super(game, data, event_types.COLORIZE_CHAR, active, key_name, keep_reveal);
constructor(
game,
data,
active,
key_name,
keep_reveal,
keep_custom_psynergy,
is_npc,
npc_label,
color_key,
intensity,
gray
) {
super(game, data, event_types.COLORIZE_CHAR, active, key_name, keep_reveal, keep_custom_psynergy);
this.color_key = color_key;
this.intensity = intensity;
this.gray = gray;
Expand Down
3 changes: 2 additions & 1 deletion base/game_events/ColorizeMapEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export class ColorizeMapEvent extends GameEvent {
active,
key_name,
keep_reveal,
keep_custom_psynergy,
color_key,
intensity,
gray,
Expand All @@ -24,7 +25,7 @@ export class ColorizeMapEvent extends GameEvent {
layer,
detach_transition
) {
super(game, data, event_types.COLORIZE_MAP, active, key_name, keep_reveal);
super(game, data, event_types.COLORIZE_MAP, active, key_name, keep_reveal, keep_custom_psynergy);
this.color_key = color_key;
this.intensity = intensity;
this.gray = gray;
Expand Down
4 changes: 2 additions & 2 deletions base/game_events/ControlBgmEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export class ControlBgmEvent extends GameEvent {
private control_type: control_types;
private volume: number;

constructor(game, data, active, key_name, keep_reveal, control_type, volume) {
super(game, data, event_types.CONTROL_BGM, active, key_name, keep_reveal);
constructor(game, data, active, key_name, keep_reveal, keep_custom_psynergy, control_type, volume) {
super(game, data, event_types.CONTROL_BGM, active, key_name, keep_reveal, keep_custom_psynergy);
this.control_type = control_type;
this.volume = volume;
}
Expand Down
4 changes: 2 additions & 2 deletions base/game_events/CreateStorageVarEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export class CreateStorageVarEvent extends GameEvent {
private initial_value: RawStorageRecord["value"];
private add: boolean;

constructor(game, data, active, key_name, keep_reveal, var_name, initial_value, add) {
super(game, data, event_types.CREATE_STORAGE_VAR, active, key_name, keep_reveal);
constructor(game, data, active, key_name, keep_reveal, keep_custom_psynergy, var_name, initial_value, add) {
super(game, data, event_types.CREATE_STORAGE_VAR, active, key_name, keep_reveal, keep_custom_psynergy);
this.var_name = var_name;
this.initial_value = initial_value;
this.add = add ?? true;
Expand Down
17 changes: 15 additions & 2 deletions base/game_events/CustomCollisionBodyEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,21 @@ export class CustomCollisionBodyEvent extends GameEvent {
collision_layer?: number;
};

constructor(game, data, active, key_name, keep_reveal, label, create, x, y, body_type, properties) {
super(game, data, event_types.CUSTOM_COLLISION_BODY, active, key_name, keep_reveal);
constructor(
game,
data,
active,
key_name,
keep_reveal,
keep_custom_psynergy,
label,
create,
x,
y,
body_type,
properties
) {
super(game, data, event_types.CUSTOM_COLLISION_BODY, active, key_name, keep_reveal, keep_custom_psynergy);
this.label = label;
this.create = create;
this.x = x;
Expand Down
Loading

0 comments on commit 408485d

Please sign in to comment.