Skip to content
Draft
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
ebea968
Fix build for linux on later versions of GCC
TauAkiou May 17, 2025
2fcf2cb
Add hacky AppImage handling code
TauAkiou May 17, 2025
f660980
Disable Shader option until fixed. Shaders cannot be turned off.
Alrysc Jul 28, 2025
3a3ea28
Pull folder and pack sorting
Alrysc Jul 28, 2025
3016e69
Pull vulnerability patch from be9d7c0
Alrysc Jul 28, 2025
e61a39b
Pull 5851d92 to fix find_nearest_characters
Alrysc Jul 28, 2025
a41ca86
Pull 0be428a to fix clang compilation
Alrysc Jul 28, 2025
d7f7c4b
Pull 1c86537, round holy panel damage up
Alrysc Jul 28, 2025
8fad764
NoCounter flag available in Lua
Alrysc Jul 28, 2025
ba150d0
Pull 0c62014 to fix Linux compilation
Alrysc Jul 28, 2025
e7d66a9
Pull 20e5b81, switch to stable_sort and Linux fix
Alrysc Jul 28, 2025
eedad66
Pull 41facef to fix mugshot issue
Alrysc Jul 28, 2025
ba9f9d8
Pull 2c19c51, stream_music start and end are optional
Alrysc Jul 28, 2025
e9354fd
Fix incorrect discard indexes when filter_hand_step discards multiple.
Alrysc Jul 28, 2025
752f978
FreedomMissionMobScene may set results in onEnd
Alrysc Jul 28, 2025
3fffaa9
Pull be42175, loads Blue Team Mob in Freedom battles
Alrysc Jul 28, 2025
14f0a88
Pull some changes from 29706ac. See comment.
Alrysc Jul 29, 2025
8f8f2cf
Avoid preparing FullSynchro unless the Player is in that emotion
Alrysc Jul 29, 2025
530c2bc
Set quitting true before onEnd iscalled. Freedom battles no longer s…
Alrysc Jul 29, 2025
8f7984b
Freedom battle does not time out combat if enemies are being deleted
Alrysc Jul 29, 2025
336e765
Fix TFC crash. Player cannot TFC until tfcStartFrame has passed.
Alrysc Jul 29, 2025
4e2c254
Pull 52a8f9e, TF chips can be marked uncounterable
Alrysc Jul 29, 2025
072ad94
Partial pull from 9fbac73
Alrysc Jul 29, 2025
3198683
Partial pull from 1e86e04
Alrysc Jul 29, 2025
4519a50
Pull f6b2706. Fire Element is not harmed by lava Tiles.
Alrysc Jul 29, 2025
b2c781a
Pull most of b60afa0, elemental hitbox interactions
Alrysc Jul 29, 2025
36a5185
Partial pull from 314fb87 and 998ea83,
Alrysc Jul 29, 2025
609196c
Pull 59d7262. Scripted Artifact, Obstacle, and Spell have battle star…
Alrysc Jul 29, 2025
88b37c8
Pull dbc635b, fix freeze status callback typo
Alrysc Jul 29, 2025
f3b1a2e
Pull 74094c5, TF actions call EndAction. Moved slightly compared to c…
Alrysc Jul 29, 2025
60d631a
Pull e4febdb, removes chance for a duplicate Entity to be added when …
Alrysc Jul 29, 2025
c5008ef
Pull 454a8f7, charge does not reset during TFC
Alrysc Jul 29, 2025
0c256a3
Pull 4c98afd, expose shoulder buttons to Lua
Alrysc Jul 29, 2025
d6da203
Process inputs during TF in Freedom battles
Alrysc Jul 29, 2025
8b472eb
Fix incorrect TF bar length
Alrysc Jul 29, 2025
74fe4ab
Pull grass heal from ad7f0a5, exclude other changes
Alrysc Jul 29, 2025
3daf261
Partial pull from c1edf79, dying doesn't decross and now clears statuses
Alrysc Jul 29, 2025
fd70012
Merge branch 'master' into feature-pull
Alrysc Jul 30, 2025
cc80415
Some more changes from 9fbac73.
Alrysc Jul 30, 2025
07048c9
Pull 02b6503, 5e892db
Alrysc Jul 30, 2025
439da7d
Pull 8b807b7, long card description used by default in battle
Alrysc Jul 30, 2025
53a36b5
Pull 641e48e, allow Flinch + Stun
Alrysc Jul 30, 2025
bb1d0b1
Pull 2e7e5e4, HasAnimation uppercases. Applied same fix to HasPoint.
Alrysc Jul 30, 2025
eec9e1d
Pull 8285a01, anger and counter not consumed unless card is boostable
Alrysc Jul 30, 2025
0fb7a27
Fix add_tags and remove_tags
Alrysc Jul 30, 2025
ee9c976
Simplify integer frame read
Alrysc Jul 30, 2025
2a3f6cd
Convert GetRed and BlueMobTeam return to references
Alrysc Jul 30, 2025
1d64ecc
Move Freedom mission result handling to FreedomMissionOverState
Alrysc Jul 30, 2025
c7267a7
Use references forMobs returned by GetRed/BlueTeamMob
Alrysc Jul 31, 2025
3b28c5f
Moved grass healing to bnTile, adjusted heal timing
Alrysc Jul 31, 2025
0daeba5
Recalculate charge times after Player init and when charge level chan…
Alrysc Jul 31, 2025
d954de2
Drag has endlag
Alrysc Jul 31, 2025
09544fe
Lava has Impact flag
Alrysc Jul 31, 2025
182e7be
Lua Entity is_stunned, is_rooted, is_frozen, is_blind
Alrysc Jul 31, 2025
4ff06b5
Partial pull from 7bc1fd5, adjust TFC timing and animation
Alrysc Jul 31, 2025
dc1ad63
Pulled some changes from e53f2c6, d0bb8f7, and 22cafc5 to fix folder …
Alrysc Aug 1, 2025
5924c92
Partial pull 993de6e for Card::props access change
Alrysc Aug 1, 2025
8246e72
Pull d236988 except for time freeze time limit
Alrysc Aug 1, 2025
0703008
Adjust position of text for DrawCardData. Now based on perspective in…
Alrysc Aug 1, 2025
a19d963
Finish pulling 1e86e04 except for intangibility and Root interaction …
Alrysc Aug 2, 2025
1ad31a8
Partial pull 5d2bb95, exclude mob boss changes
Alrysc Aug 2, 2025
0d9b0a7
Uncomment Sand reaction to Wind
Alrysc Aug 2, 2025
f3d0434
Sea damage on Fire Entities
Alrysc Aug 2, 2025
fba098a
Sea bonus applies to Aqua cards
Alrysc Aug 3, 2025
0431d67
Merge pull request #2 from Alrysc/feature-pull-tiles
Alrysc Aug 3, 2025
2262bcf
Fix shaking causing incorrect draw position
Alrysc Aug 3, 2025
b60fab0
Adjust Drag endlag placement
Alrysc Aug 3, 2025
03a5353
Fix charge time, added Player::IsCharging, access to Lua
Alrysc Aug 3, 2025
9d463ec
Fix incorrect poison damage time and panel flash time
Alrysc Aug 4, 2025
ba5c93a
Pull most of 6bd901a, 5a31557, and dee4fb7, extra changes to make hea…
Alrysc Aug 4, 2025
f33ee8f
Player.charged_time_table_func is called with charge level instead of…
Alrysc Aug 5, 2025
ae77533
Revert broken Tile cooldown to previous, correct value. Broken and Se…
Alrysc Aug 5, 2025
ec56ecc
Prevent using cards during flinch, cards can be queued during movement
Alrysc Aug 5, 2025
544054d
Reset charge tracking if charge was reset
Alrysc Aug 7, 2025
89ad63f
Add no_counter to Buster
Alrysc Aug 30, 2025
a3f057f
New StatusBehaviorDirector, handles status tick and application, stat…
Alrysc Aug 30, 2025
9b7a3b7
Swap stun and freeze enum value so status order is correct
Alrysc Aug 30, 2025
ff015a0
Entity uses StatusBehaviorDirector. Many changes to statuses and reac…
Alrysc Aug 30, 2025
1f0020e
BattleSceneBase can show counter text for other players. NetworkBattl…
Alrysc Aug 30, 2025
2a87abb
Changed shader timer to uint8_t, initialized some variables in Status…
Alrysc Aug 30, 2025
c773ca0
Update comment on check for PlayerSelectedCardsUI
Alrysc Aug 30, 2025
f652de3
More fine-tuned CanAttack return to represent most known outcome, wit…
Alrysc Sep 12, 2025
3cb9838
Bools in PlayerControlledState::OnUpdate made const
Alrysc Sep 12, 2025
7a5c85e
Avoid status tick even when Drag expired
Alrysc Sep 13, 2025
2634a13
Correct Lua bindings for InputEvents on Shoot, Left/Right Shoulder
Alrysc Sep 13, 2025
f6af9a4
Rename MakeActionable and IsActionable to MakeIdle and IsIdle. Freedo…
Alrysc Sep 15, 2025
3143c18
Use new name for MakeActionable and IsActionable in bnCharacter.cpp
Alrysc Sep 15, 2025
8d9eff0
Fix infinite ice slide and Drag move queue
Alrysc Sep 15, 2025
703c6df
Add CanAttack check to HandleCardEvent.
Alrysc Sep 15, 2025
e48ed67
Change StatusBehaviorDirector::ClearStatus(Hit::Flags flags) to clear…
Alrysc Sep 16, 2025
6d97932
Remove some explicit != 0 checks in expressions involving Hit::Flags
Alrysc Sep 16, 2025
a5efe49
Remove unused timestop check from ProcessFlags
Alrysc Sep 16, 2025
4506910
Set aggressor on Buster Spell
Alrysc Sep 16, 2025
bd315f0
Added Entity::HandleNewStatuses, moved some logic from Update. Player…
Alrysc Sep 17, 2025
0911337
Reset statuses and actionability when Player transforms
Alrysc Sep 20, 2025
e33c554
Prevent flinch when stunned
Alrysc Sep 20, 2025
f603fd0
Let MoveEvents end when time >= lastFrame instead of >
Alrysc Sep 21, 2025
f2ef077
MoveEvent rework. MoveAction is new class representing moves, all mov…
Alrysc Sep 29, 2025
7907ec3
Fix backwards actionBlocked assignment, update Character::CanAttackIm…
Alrysc Sep 29, 2025
335c2eb
MoveAction no longer refreshes position. Entity refreshes position du…
Alrysc Sep 30, 2025
fef7495
Remove MoveEvent::Update, use OnUpdate instead, fixes issue related t…
Alrysc Oct 1, 2025
5d18f6a
HandleNewStatuses call made closer to actual applied statuses
Alrysc Oct 1, 2025
a55a236
Comment cleanup
Alrysc Oct 1, 2025
74bcc5f
Rename ClearStatus to ClearStatuses and ClearAllStatuses
Alrysc Oct 1, 2025
9bdc79e
Character blockingStatuses moved to static member of Character
Alrysc Oct 1, 2025
e76752b
Change MoveAction's owner to Entity&
Alrysc Oct 1, 2025
985a8e7
MoveAction::IsSliding checks positive height
Alrysc Oct 1, 2025
0321654
Change unnecessary <= to ==
Alrysc Oct 1, 2025
54f1692
Clarify comment on Hit::drag tick
Alrysc Oct 1, 2025
efaf01d
Player is no longer marked for decross unless they were in a form
Alrysc Oct 6, 2025
5a88175
Correctly handle stun and freeze cancelling each other. Allow Flinch …
Alrysc Oct 6, 2025
5079f49
Fix possible softlock when countering timefreeze chips on the last po…
Alrysc Oct 6, 2025
ae710d9
Rename ScriptedPlayer charged_time_table_func and ScriptedPlayerForm …
Alrysc Oct 6, 2025
c875405
Fix grass heal using incorrect timers
Alrysc Oct 6, 2025
05941cd
Add Lua callback for Entity.is_dragged
Alrysc Oct 6, 2025
28d9aeb
Pass weakWrap to Lua charge_time_func
Alrysc Oct 6, 2025
7e6e162
Character::CanAttackImpl checks blocking statuses
Alrysc Oct 7, 2025
ac1e672
DragAction uses endlag for final move
Alrysc Oct 7, 2025
231ce71
Pull Confuse from 8d47940 and c749c3a, slightly modified for StatusBe…
Alrysc Oct 8, 2025
e467f0d
End confusion when hit by stun or freeze
Alrysc Oct 10, 2025
079a789
Merge pull request #3 from Alrysc/status_rework
Alrysc Oct 10, 2025
2736b6e
Pull Cust read/write and changes from 22cafc542a71c7b4c662e9c89bc3357…
Alrysc Oct 10, 2025
781008f
Fix Custom bar animation speed being based on current duration instea…
Alrysc Oct 10, 2025
f1897b5
Add Battle.get_turn_count
Alrysc Oct 10, 2025
017ef04
Added secondaryElement to HitProps, some durations for certain status…
Alrysc Oct 11, 2025
d8742cf
Player::SetEmotion handles setting or removing multiplier, removed Lo…
Alrysc Oct 11, 2025
8dc4d6d
Check filtered flags for no_counter, so TimeFreeze properly does not …
Alrysc Oct 11, 2025
ceab5b7
Ensure localPlayer is not added past vector end in GetAllPlayers
Alrysc Oct 11, 2025
60d9c3c
ObstacleBody blocks Confuse and Blind
Alrysc Oct 11, 2025
acd748d
Confuse and blind no longer reset anims when applied while already ap…
Alrysc Oct 11, 2025
9f29911
Remove duplicate Lua HitProps:drag, renamed to drg to avoid duplicate…
Alrysc Oct 11, 2025
4578022
Rename package partitioner getters to not conflict with class name
Alrysc Oct 12, 2025
d76b207
Rename ConfigSetting getter in Game
Alrysc Oct 12, 2025
07afc4b
Include cstdint in stx/string
Alrysc Oct 12, 2025
a1ec131
Move stx/string cstdint include to header
Alrysc Oct 12, 2025
6062a22
Use this->pivotPred
Alrysc Oct 12, 2025
9ca8fa8
Peek now returns const reference, as comment says. Stored return valu…
Alrysc Oct 12, 2025
b913280
Include cstdint for uint16_t
Alrysc Oct 12, 2025
ea6faff
SelectedCardsUI::Peek now returns const non-reference
Alrysc Oct 13, 2025
6440cbd
Merge TauAkiou:gcc-fix for appimage building.
Alrysc Oct 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion BattleNetwork/battlescene/States/bnCardSelectBattleState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ void CardSelectBattleState::onUpdate(double elapsed)
}
else {
// Send off the remaining hands to any scene implementations that need it
scene.OnSelectNewCards(player, ui->GetRemainingCards());
std::vector<Battle::Card> cards = ui->GetRemainingCards();
scene.OnSelectNewCards(player, cards);
}
}

Expand Down
43 changes: 33 additions & 10 deletions BattleNetwork/battlescene/States/bnTimeFreezeBattleState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ void TimeFreezeBattleState::ProcessInputs()
for (std::shared_ptr<Player>& p : this->GetScene().GetAllPlayers()) {
p->InputState().Process();

if (summonTick < tfcStartFrame) {
continue;
}

if (p->InputState().Has(InputEvents::pressed_use_chip)) {
Logger::Logf(LogLevel::info, "InputEvents::pressed_use_chip for player %i", player_idx);
std::shared_ptr<PlayerSelectedCardsUI> cardsUI = p->GetFirstComponent<PlayerSelectedCardsUI>();
Expand All @@ -81,8 +85,6 @@ void TimeFreezeBattleState::ProcessInputs()
}
}
}

p->GetChargeComponent().SetCharging(false);
}
}
player_idx++;
Expand Down Expand Up @@ -196,6 +198,7 @@ void TimeFreezeBattleState::onUpdate(double elapsed)
}
else{
first->user->Reveal();
first->action->EndAction();
scene.UntrackMobCharacter(first->stuntDouble);
scene.GetField()->DeallocEntity(first->stuntDouble->GetID());

Expand All @@ -216,6 +219,11 @@ void TimeFreezeBattleState::onUpdate(double elapsed)
}
break;
}

for (std::shared_ptr<Player>& player : GetScene().GetAllPlayers()) {
ChargeEffectSceneNode& chargeNode = player->GetChargeComponent();
chargeNode.Animate(elapsed);
}
}

void TimeFreezeBattleState::onDraw(sf::RenderTexture& surface)
Expand All @@ -228,15 +236,24 @@ void TimeFreezeBattleState::onDraw(sf::RenderTexture& surface)
BattleSceneBase& scene = GetScene();
const auto& first = tfEvents.begin();

double tfcTimerScale = swoosh::ease::linear(summonTick.asSeconds().value, summonTextLength.asSeconds().value, 1.0);
double tfcTimerScale = 0;

double summonTickSeconds = summonTick.asSeconds().value;
double fadeSeconds = fadeInOutLength.asSeconds().value;


if (summonTickSeconds > fadeSeconds) {
tfcTimerScale = swoosh::ease::linear((summonTickSeconds - fadeSeconds), (double)(summonTextLength.asSeconds().value - fadeSeconds), 1.0);
}

double scale = swoosh::ease::linear(summonTick.asSeconds().value, fadeInOutLength.asSeconds().value, 1.0);
scale = std::min(scale, 1.0);

bar = sf::RectangleShape({ 100.f * static_cast<float>(1.0 - tfcTimerScale), 2.f });
bar.setScale(2.f, 2.f);

if (summonTick >= summonTextLength - fadeInOutLength) {
scale = swoosh::ease::linear((summonTextLength - summonTick).asSeconds().value, fadeInOutLength.asSeconds().value, 1.0);
if (summonTick >= summonTextLength) {
scale = swoosh::ease::linear((summonTextLength - summonTick).asSeconds().value, fadeSeconds, 1.0);
scale = std::max(scale, 0.0);
}

Expand Down Expand Up @@ -267,7 +284,7 @@ void TimeFreezeBattleState::onDraw(sf::RenderTexture& surface)
summonsLabel.setPosition(position);
scene.DrawWithPerspective(summonsLabel, surface);

if (currState == state::display_name) {
if (currState == state::display_name && first->action->GetMetaData().counterable) {
// draw TF bar underneath
bar.setPosition(position + sf::Vector2f(0.f + 2.f, 12.f + 2.f));
bar.setFillColor(sf::Color::Black);
Expand All @@ -276,6 +293,7 @@ void TimeFreezeBattleState::onDraw(sf::RenderTexture& surface)
bar.setPosition(position + sf::Vector2f(0.f, 12.f));

sf::Uint8 b = (sf::Uint8)swoosh::ease::interpolate((1.0-tfcTimerScale), 0.0, 255.0);

bar.setFillColor(sf::Color(255, 255, b));
scene.DrawWithPerspective(bar, surface);
}
Expand Down Expand Up @@ -416,21 +434,26 @@ const bool TimeFreezeBattleState::CanCounter(std::shared_ptr<Character> user)
// tfc window ended
if (summonTick > summonTextLength) return false;

bool addEvent = true;
// bool addEvent = true;

if (!tfEvents.empty()) {
std::shared_ptr<CardAction> action = tfEvents.begin()->action;

// some actions cannot be countered
if (!action->GetMetaData().counterable) return false;

// only opposing players can counter
std::shared_ptr<Character> lastActor = tfEvents.begin()->action->GetActor();
std::shared_ptr<Character> lastActor = action->GetActor();
if (!lastActor->Teammate(user->GetTeam())) {
playerCountered = true;
Logger::Logf(LogLevel::info, "Player was countered!");
}
else {
addEvent = false;
return false;
}
}

return addEvent;
return true;
}

void TimeFreezeBattleState::HandleTimeFreezeCounter(std::shared_ptr<CardAction> action, uint64_t timestamp)
Expand Down
101 changes: 71 additions & 30 deletions BattleNetwork/battlescene/bnBattleSceneBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,27 +230,7 @@ void BattleSceneBase::OnCounter(Entity& victim, Entity& aggressor)
victim.ToggleCounter(false); // disable counter frame for the victim
victim.Stun(frames(150));

if (p->IsInForm() == false && p->GetEmotion() != Emotion::evil) {
if (p == localPlayer) {
field->RevealCounterFrames(true);
}

// node positions are relative to the parent node's origin
sf::FloatRect bounds = p->getLocalBounds();
counterReveal->setPosition(0, -bounds.height / 4.0f);
p->AddNode(counterReveal);

std::shared_ptr<PlayerSelectedCardsUI> cardUI = p->GetFirstComponent<PlayerSelectedCardsUI>();

if (cardUI) {
cardUI->SetMultiplier(2);
}

p->SetEmotion(Emotion::full_synchro);

// when players get hit by impact, battle scene takes back counter blessings
p->AddDefenseRule(counterCombatRule);
}
PreparePlayerFullSynchro(p);
}
}

Expand Down Expand Up @@ -410,7 +390,9 @@ std::shared_ptr<Player> BattleSceneBase::GetPlayerFromEntityID(Entity::ID_t ID)

void BattleSceneBase::OnCardActionUsed(std::shared_ptr<CardAction> action, uint64_t timestamp)
{
HandleCounterLoss(*action->GetActor(), true);
if (action->GetMetaData().canBoost) {
HandleCounterLoss(*action->GetActor(), true);
}
}

sf::Vector2f BattleSceneBase::PerspectiveOffset(const sf::Vector2f& pos)
Expand Down Expand Up @@ -472,6 +454,10 @@ void BattleSceneBase::SpawnLocalPlayer(int x, int y)
allPlayerTeamHash[localPlayer.get()] = team;

HitListener::Subscribe(*localPlayer);

if (localPlayer->GetEmotion() == Emotion::full_synchro) {
PreparePlayerFullSynchro(localPlayer);
}
}

void BattleSceneBase::SpawnOtherPlayer(std::shared_ptr<Player> player, int x, int y)
Expand All @@ -498,6 +484,10 @@ void BattleSceneBase::SpawnOtherPlayer(std::shared_ptr<Player> player, int x, in
allPlayerTeamHash[player.get()] = team;

HitListener::Subscribe(*player);

if (player->GetEmotion() == Emotion::full_synchro) {
PreparePlayerFullSynchro(player);
}
}

void BattleSceneBase::LoadRedTeamMob(Mob& mob)
Expand Down Expand Up @@ -566,18 +556,39 @@ void BattleSceneBase::FilterSupportCards(const std::shared_ptr<Player>& player,
meta.filterHandStep(cards[i].props, adjCards);
}

size_t this_card = i;
/*
Whether or not to do another loop on this index.
True when left, right, or this card were deleted.

By setting true on left and right delete, the filter

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running on the same card again is a little suspicious but it does seem sound. When changing the layout - new patterns would need to be considered. Let's talk about this a little more.

step will run for this card again so that it can run
with the new adjacent cards.

By setting true when deleting itself, the new card
coming into this index won't be skipped.
*/
bool check_again = false;

if (adjCards.deleteLeft) {
cards.erase(cards.begin() + i - 1u);
i--;
cards.erase(cards.begin() + this_card - 1u);
this_card--;
check_again = true;
}

if (adjCards.deleteRight) {
cards.erase(cards.begin() + i + 1u);
i--;
cards.erase(cards.begin() + this_card + 1u);
// This card index hasn't changed

check_again = true;
}

if (adjCards.deleteThisCard) {
cards.erase(cards.begin() + i);
cards.erase(cards.begin() + this_card);
check_again = true;
}

if (check_again) {
i--;
}
}
Expand Down Expand Up @@ -1035,6 +1046,30 @@ void BattleSceneBase::DrawWithPerspective(sf::Shape& shape, sf::RenderTarget& su
shape.setOrigin(origin);
}

void BattleSceneBase::PreparePlayerFullSynchro(const std::shared_ptr<Player>& player) {
if (player->IsInForm() == true || player->GetEmotion() == Emotion::evil) return;

if (player == localPlayer) {
field->RevealCounterFrames(true);
}

// node positions are relative to the parent node's origin
sf::FloatRect bounds = player->getLocalBounds();
counterReveal->setPosition(0, -bounds.height / 4.0f);
player->AddNode(counterReveal);

std::shared_ptr<PlayerSelectedCardsUI> cardUI = player->GetFirstComponent<PlayerSelectedCardsUI>();

if (cardUI) {
cardUI->SetMultiplier(2);
}

player->SetEmotion(Emotion::full_synchro);

// when players get hit by impact, battle scene takes back counter blessings
player->AddDefenseRule(counterCombatRule);
}

void BattleSceneBase::DrawWithPerspective(sf::Sprite& sprite, sf::RenderTarget& surf)
{
sf::Vector2f position = sprite.getPosition();
Expand Down Expand Up @@ -1097,6 +1132,14 @@ std::vector<std::shared_ptr<Player>> BattleSceneBase::GetAllPlayers()
return result;
}

Mob* BattleSceneBase::GetRedTeamMob() {
return redTeamMob;
}

Mob* BattleSceneBase::GetBlueTeamMob() {
return blueTeamMob;
}


std::shared_ptr<Field> BattleSceneBase::GetField()
{
Expand Down Expand Up @@ -1242,6 +1285,7 @@ std::vector<std::reference_wrapper<const Character>> BattleSceneBase::BlueTeamMo

void BattleSceneBase::Quit(const FadeOut& mode) {
if(quitting) return;
quitting = true;

// end the current state
if(current) {
Expand All @@ -1252,7 +1296,6 @@ void BattleSceneBase::Quit(const FadeOut& mode) {
// NOTE: swoosh quirk
if (getController().getStackSize() == 1) {
getController().pop();
quitting = true;
return;
}

Expand All @@ -1268,8 +1311,6 @@ void BattleSceneBase::Quit(const FadeOut& mode) {
// mode == FadeOut::pixelate
getController().pop<segue<PixelateBlackWashFade>>();
}

quitting = true;
}


Expand Down
3 changes: 3 additions & 0 deletions BattleNetwork/battlescene/bnBattleSceneBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -383,12 +383,15 @@ class BattleSceneBase :
bool TrackOtherPlayer(std::shared_ptr<Player>& other);
void UntrackOtherPlayer(std::shared_ptr<Player>& other);
void UntrackMobCharacter(std::shared_ptr<Character>& character);
void PreparePlayerFullSynchro(const std::shared_ptr<Player>& player);
bool IsPlayerDeleted() const;

std::shared_ptr<Player> GetLocalPlayer();
const std::shared_ptr<Player> GetLocalPlayer() const;
std::vector<std::shared_ptr<Player>> GetOtherPlayers();
std::vector<std::shared_ptr<Player>> GetAllPlayers();
Mob* GetRedTeamMob();
Mob* GetBlueTeamMob();
std::shared_ptr<Field> GetField();
const std::shared_ptr<Field> GetField() const;
CardSelectionCust& GetCardSelectWidget();
Expand Down
Loading