forked from Pheelbert/battlenetwork
-
Notifications
You must be signed in to change notification settings - Fork 45
Expermental Feature Pull (WIP) #251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Alrysc
wants to merge
140
commits into
TheMaverickProgrammer:master
Choose a base branch
from
Alrysc:feature-pull
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
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 2fcf2cb
Add hacky AppImage handling code
TauAkiou f660980
Disable Shader option until fixed. Shaders cannot be turned off.
Alrysc 3a3ea28
Pull folder and pack sorting
Alrysc 3016e69
Pull vulnerability patch from be9d7c0
Alrysc e61a39b
Pull 5851d92 to fix find_nearest_characters
Alrysc a41ca86
Pull 0be428a to fix clang compilation
Alrysc d7f7c4b
Pull 1c86537, round holy panel damage up
Alrysc 8fad764
NoCounter flag available in Lua
Alrysc ba150d0
Pull 0c62014 to fix Linux compilation
Alrysc e7d66a9
Pull 20e5b81, switch to stable_sort and Linux fix
Alrysc eedad66
Pull 41facef to fix mugshot issue
Alrysc ba9f9d8
Pull 2c19c51, stream_music start and end are optional
Alrysc e9354fd
Fix incorrect discard indexes when filter_hand_step discards multiple.
Alrysc 752f978
FreedomMissionMobScene may set results in onEnd
Alrysc 3fffaa9
Pull be42175, loads Blue Team Mob in Freedom battles
Alrysc 14f0a88
Pull some changes from 29706ac. See comment.
Alrysc 8f8f2cf
Avoid preparing FullSynchro unless the Player is in that emotion
Alrysc 530c2bc
Set quitting true before onEnd iscalled. Freedom battles no longer s…
Alrysc 8f7984b
Freedom battle does not time out combat if enemies are being deleted
Alrysc 336e765
Fix TFC crash. Player cannot TFC until tfcStartFrame has passed.
Alrysc 4e2c254
Pull 52a8f9e, TF chips can be marked uncounterable
Alrysc 072ad94
Partial pull from 9fbac73
Alrysc 3198683
Partial pull from 1e86e04
Alrysc 4519a50
Pull f6b2706. Fire Element is not harmed by lava Tiles.
Alrysc b2c781a
Pull most of b60afa0, elemental hitbox interactions
Alrysc 36a5185
Partial pull from 314fb87 and 998ea83,
Alrysc 609196c
Pull 59d7262. Scripted Artifact, Obstacle, and Spell have battle star…
Alrysc 88b37c8
Pull dbc635b, fix freeze status callback typo
Alrysc f3b1a2e
Pull 74094c5, TF actions call EndAction. Moved slightly compared to c…
Alrysc 60d631a
Pull e4febdb, removes chance for a duplicate Entity to be added when …
Alrysc c5008ef
Pull 454a8f7, charge does not reset during TFC
Alrysc 0c256a3
Pull 4c98afd, expose shoulder buttons to Lua
Alrysc d6da203
Process inputs during TF in Freedom battles
Alrysc 8b472eb
Fix incorrect TF bar length
Alrysc 74fe4ab
Pull grass heal from ad7f0a5, exclude other changes
Alrysc 3daf261
Partial pull from c1edf79, dying doesn't decross and now clears statuses
Alrysc fd70012
Merge branch 'master' into feature-pull
Alrysc cc80415
Some more changes from 9fbac73.
Alrysc 07048c9
Pull 02b6503, 5e892db
Alrysc 439da7d
Pull 8b807b7, long card description used by default in battle
Alrysc 53a36b5
Pull 641e48e, allow Flinch + Stun
Alrysc bb1d0b1
Pull 2e7e5e4, HasAnimation uppercases. Applied same fix to HasPoint.
Alrysc eec9e1d
Pull 8285a01, anger and counter not consumed unless card is boostable
Alrysc 0fb7a27
Fix add_tags and remove_tags
Alrysc ee9c976
Simplify integer frame read
Alrysc 2a3f6cd
Convert GetRed and BlueMobTeam return to references
Alrysc 1d64ecc
Move Freedom mission result handling to FreedomMissionOverState
Alrysc c7267a7
Use references forMobs returned by GetRed/BlueTeamMob
Alrysc 3b28c5f
Moved grass healing to bnTile, adjusted heal timing
Alrysc 0daeba5
Recalculate charge times after Player init and when charge level chan…
Alrysc d954de2
Drag has endlag
Alrysc 09544fe
Lava has Impact flag
Alrysc 182e7be
Lua Entity is_stunned, is_rooted, is_frozen, is_blind
Alrysc 4ff06b5
Partial pull from 7bc1fd5, adjust TFC timing and animation
Alrysc dc1ad63
Pulled some changes from e53f2c6, d0bb8f7, and 22cafc5 to fix folder …
Alrysc 5924c92
Partial pull 993de6e for Card::props access change
Alrysc 8246e72
Pull d236988 except for time freeze time limit
Alrysc 0703008
Adjust position of text for DrawCardData. Now based on perspective in…
Alrysc a19d963
Finish pulling 1e86e04 except for intangibility and Root interaction …
Alrysc 1ad31a8
Partial pull 5d2bb95, exclude mob boss changes
Alrysc 0d9b0a7
Uncomment Sand reaction to Wind
Alrysc f3d0434
Sea damage on Fire Entities
Alrysc fba098a
Sea bonus applies to Aqua cards
Alrysc 0431d67
Merge pull request #2 from Alrysc/feature-pull-tiles
Alrysc 2262bcf
Fix shaking causing incorrect draw position
Alrysc b60fab0
Adjust Drag endlag placement
Alrysc 03a5353
Fix charge time, added Player::IsCharging, access to Lua
Alrysc 9d463ec
Fix incorrect poison damage time and panel flash time
Alrysc ba5c93a
Pull most of 6bd901a, 5a31557, and dee4fb7, extra changes to make hea…
Alrysc f33ee8f
Player.charged_time_table_func is called with charge level instead of…
Alrysc ae77533
Revert broken Tile cooldown to previous, correct value. Broken and Se…
Alrysc ec56ecc
Prevent using cards during flinch, cards can be queued during movement
Alrysc 544054d
Reset charge tracking if charge was reset
Alrysc 89ad63f
Add no_counter to Buster
Alrysc a3f057f
New StatusBehaviorDirector, handles status tick and application, stat…
Alrysc 9b7a3b7
Swap stun and freeze enum value so status order is correct
Alrysc ff015a0
Entity uses StatusBehaviorDirector. Many changes to statuses and reac…
Alrysc 1f0020e
BattleSceneBase can show counter text for other players. NetworkBattl…
Alrysc 2a87abb
Changed shader timer to uint8_t, initialized some variables in Status…
Alrysc c773ca0
Update comment on check for PlayerSelectedCardsUI
Alrysc f652de3
More fine-tuned CanAttack return to represent most known outcome, wit…
Alrysc 3cb9838
Bools in PlayerControlledState::OnUpdate made const
Alrysc 7a5c85e
Avoid status tick even when Drag expired
Alrysc 2634a13
Correct Lua bindings for InputEvents on Shoot, Left/Right Shoulder
Alrysc f6af9a4
Rename MakeActionable and IsActionable to MakeIdle and IsIdle. Freedo…
Alrysc 3143c18
Use new name for MakeActionable and IsActionable in bnCharacter.cpp
Alrysc 8d9eff0
Fix infinite ice slide and Drag move queue
Alrysc 703c6df
Add CanAttack check to HandleCardEvent.
Alrysc e48ed67
Change StatusBehaviorDirector::ClearStatus(Hit::Flags flags) to clear…
Alrysc 6d97932
Remove some explicit != 0 checks in expressions involving Hit::Flags
Alrysc a5efe49
Remove unused timestop check from ProcessFlags
Alrysc 4506910
Set aggressor on Buster Spell
Alrysc bd315f0
Added Entity::HandleNewStatuses, moved some logic from Update. Player…
Alrysc 0911337
Reset statuses and actionability when Player transforms
Alrysc e33c554
Prevent flinch when stunned
Alrysc f603fd0
Let MoveEvents end when time >= lastFrame instead of >
Alrysc f2ef077
MoveEvent rework. MoveAction is new class representing moves, all mov…
Alrysc 7907ec3
Fix backwards actionBlocked assignment, update Character::CanAttackIm…
Alrysc 335c2eb
MoveAction no longer refreshes position. Entity refreshes position du…
Alrysc fef7495
Remove MoveEvent::Update, use OnUpdate instead, fixes issue related t…
Alrysc 5d18f6a
HandleNewStatuses call made closer to actual applied statuses
Alrysc a55a236
Comment cleanup
Alrysc 74bcc5f
Rename ClearStatus to ClearStatuses and ClearAllStatuses
Alrysc 9bdc79e
Character blockingStatuses moved to static member of Character
Alrysc e76752b
Change MoveAction's owner to Entity&
Alrysc 985a8e7
MoveAction::IsSliding checks positive height
Alrysc 0321654
Change unnecessary <= to ==
Alrysc 54f1692
Clarify comment on Hit::drag tick
Alrysc efaf01d
Player is no longer marked for decross unless they were in a form
Alrysc 5a88175
Correctly handle stun and freeze cancelling each other. Allow Flinch …
Alrysc 5079f49
Fix possible softlock when countering timefreeze chips on the last po…
Alrysc ae710d9
Rename ScriptedPlayer charged_time_table_func and ScriptedPlayerForm …
Alrysc c875405
Fix grass heal using incorrect timers
Alrysc 05941cd
Add Lua callback for Entity.is_dragged
Alrysc 28d9aeb
Pass weakWrap to Lua charge_time_func
Alrysc 7e6e162
Character::CanAttackImpl checks blocking statuses
Alrysc ac1e672
DragAction uses endlag for final move
Alrysc 231ce71
Pull Confuse from 8d47940 and c749c3a, slightly modified for StatusBe…
Alrysc e467f0d
End confusion when hit by stun or freeze
Alrysc 079a789
Merge pull request #3 from Alrysc/status_rework
Alrysc 2736b6e
Pull Cust read/write and changes from 22cafc542a71c7b4c662e9c89bc3357…
Alrysc 781008f
Fix Custom bar animation speed being based on current duration instea…
Alrysc f1897b5
Add Battle.get_turn_count
Alrysc 017ef04
Added secondaryElement to HitProps, some durations for certain status…
Alrysc d8742cf
Player::SetEmotion handles setting or removing multiplier, removed Lo…
Alrysc 8dc4d6d
Check filtered flags for no_counter, so TimeFreeze properly does not …
Alrysc ceab5b7
Ensure localPlayer is not added past vector end in GetAllPlayers
Alrysc 60d9c3c
ObstacleBody blocks Confuse and Blind
Alrysc acd748d
Confuse and blind no longer reset anims when applied while already ap…
Alrysc 9f29911
Remove duplicate Lua HitProps:drag, renamed to drg to avoid duplicate…
Alrysc 4578022
Rename package partitioner getters to not conflict with class name
Alrysc d76b207
Rename ConfigSetting getter in Game
Alrysc 07afc4b
Include cstdint in stx/string
Alrysc a1ec131
Move stx/string cstdint include to header
Alrysc 6062a22
Use this->pivotPred
Alrysc 9ca8fa8
Peek now returns const reference, as comment says. Stored return valu…
Alrysc b913280
Include cstdint for uint16_t
Alrysc ea6faff
SelectedCardsUI::Peek now returns const non-reference
Alrysc 6440cbd
Merge TauAkiou:gcc-fix for appimage building.
Alrysc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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); | ||
} | ||
} | ||
|
||
|
@@ -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) { | ||
TheMaverickProgrammer marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
HandleCounterLoss(*action->GetActor(), true); | ||
} | ||
} | ||
|
||
sf::Vector2f BattleSceneBase::PerspectiveOffset(const sf::Vector2f& pos) | ||
|
@@ -472,6 +454,10 @@ void BattleSceneBase::SpawnLocalPlayer(int x, int y) | |
allPlayerTeamHash[localPlayer.get()] = team; | ||
|
||
HitListener::Subscribe(*localPlayer); | ||
|
||
if (localPlayer->GetEmotion() == Emotion::full_synchro) { | ||
TheMaverickProgrammer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
PreparePlayerFullSynchro(localPlayer); | ||
} | ||
} | ||
|
||
void BattleSceneBase::SpawnOtherPlayer(std::shared_ptr<Player> player, int x, int y) | ||
|
@@ -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) | ||
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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--; | ||
} | ||
} | ||
|
@@ -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(); | ||
|
@@ -1097,6 +1132,14 @@ std::vector<std::shared_ptr<Player>> BattleSceneBase::GetAllPlayers() | |
return result; | ||
} | ||
|
||
Mob* BattleSceneBase::GetRedTeamMob() { | ||
TheMaverickProgrammer marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
return redTeamMob; | ||
} | ||
|
||
Mob* BattleSceneBase::GetBlueTeamMob() { | ||
return blueTeamMob; | ||
} | ||
|
||
|
||
std::shared_ptr<Field> BattleSceneBase::GetField() | ||
{ | ||
|
@@ -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) { | ||
|
@@ -1252,7 +1296,6 @@ void BattleSceneBase::Quit(const FadeOut& mode) { | |
// NOTE: swoosh quirk | ||
if (getController().getStackSize() == 1) { | ||
getController().pop(); | ||
quitting = true; | ||
return; | ||
} | ||
|
||
|
@@ -1268,8 +1311,6 @@ void BattleSceneBase::Quit(const FadeOut& mode) { | |
// mode == FadeOut::pixelate | ||
getController().pop<segue<PixelateBlackWashFade>>(); | ||
} | ||
|
||
quitting = true; | ||
} | ||
|
||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.