Skip to content
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

Dragon Discipile WIP #619

Draft
wants to merge 44 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
54ec304
Dragon Disciple WIP
Sagenlicht Sep 16, 2021
0312673
Updated Dragon Disciple
Sagenlicht Sep 17, 2021
b9d12de
Update dragon_disciple.py
Sagenlicht Sep 17, 2021
6e6b68f
Merge branch 'master' into DragonDisciple
Sagenlicht Sep 20, 2021
783606e
Added Ability Boost
Sagenlicht Sep 20, 2021
0cb6e91
Fixed Heritage bug
Sagenlicht Sep 20, 2021
809df43
Fixed Cone Breath Weapon
Sagenlicht Sep 20, 2021
1ad5cfa
Further progress for the DD
Sagenlicht Sep 21, 2021
6e4d1e0
Finished help file for DD
Sagenlicht Sep 22, 2021
7fcad2c
DD: Dropped Blindsense, fixed fire smoke
Sagenlicht Sep 23, 2021
d02b5fb
Added Flying Toggle (Nonfunctional yet)
Sagenlicht Sep 30, 2021
e641ab5
Moved Flying to seperate condtion
Sagenlicht Oct 1, 2021
2ebb5a7
added Darley Wings Mesh as Wings for the DD
Sagenlicht Oct 14, 2021
f77c9dc
Merge branch 'master' into DragonDisciple
Sagenlicht Oct 26, 2021
d8ae0ec
Merge branch 'master' into DragonDisciple
Nov 21, 2021
7ec38ee
String fixes: DD requirements fit inside scroll box; feat descrition …
Nov 22, 2021
b085be2
Added PyObjHndl method anim_goal_throw_spell_w_cast_anim to properly …
Nov 22, 2021
9696b90
DD fixes Breath weapon
Nov 22, 2021
d1daf13
Merge branch 'DragonDisciple' of https://github.com/GrognardsFromHell…
Sagenlicht Nov 22, 2021
1aabeb1
Update to DD Draconic Heritage Handling
Sagenlicht Nov 23, 2021
2d2d8cb
First Draft of Bonus Spells Feature
Sagenlicht Nov 24, 2021
fbbfe61
Merge branch 'master' into DragonDisciple
Sagenlicht Nov 24, 2021
4099c50
Merge branch 'master' into DragonDisciple
Nov 24, 2021
67e6a9e
Merge branch 'DragonDisciple' of https://github.com/GrognardsFromHell…
Nov 24, 2021
a43fa6a
Forgot to merge the draconic_heritage feat to the DD
Sagenlicht Nov 25, 2021
8f9182e
Added new error codes
Sagenlicht Dec 6, 2021
1586499
Condition hashtable init replacement; added log message for when it o…
Dec 22, 2021
96c76ef
Merge branch 'DragonDisciple' of https://github.com/GrognardsFromHell…
Dec 22, 2021
b43a73d
reflex throw will now use SpellSaveThrow when used for spell actions,…
Dec 22, 2021
e21d766
Added get_caster_class method to python EventObjSpellsPerDay
Dec 22, 2021
05c1d8e
Renamed chargeAfterPicker for more accurate meaning
Dec 23, 2021
5fe70c7
Minor magic number cleanup from natural attacks review
Dec 24, 2021
370c30b
Changed Bonus Spells per Day
Sagenlicht Jan 18, 2022
422d1c4
Update dragon_disciple.py
Sagenlicht Jan 18, 2022
69a037a
Merge pull request #701 from GrognardsFromHell/bugfixes
DudeMcDude Sep 6, 2022
e590df5
Fixes animation script particle errors on map load
Sep 7, 2022
0a2315f
Merge pull request #702 from GrognardsFromHell/bugfixes
DudeMcDude Sep 7, 2022
fdb94bf
Minor wiki help errors
Sep 7, 2022
bb602d2
Merge branch 'bugfixes' into develop
Sep 9, 2022
b750dd0
Scribe scroll - automated infrastructure instead of the old manual pr…
Sep 9, 2022
9b6d579
Fixes crash issue when AI party member casts Dominate Monster (aka 'S…
Sep 10, 2022
9eefcb0
Fixes #682
Sep 10, 2022
d1b2858
Fixed error in targeting.py will_kos
Sep 10, 2022
c4ef9bd
Merge from develop
Sep 11, 2022
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
Prev Previous commit
Next Next commit
Renamed chargeAfterPicker for more accurate meaning
  • Loading branch information
DudeMcDude authored and DudeMcDude committed Dec 23, 2021
commit 05c1d8eadaf014be56e9713924668767dd2c298e
14 changes: 7 additions & 7 deletions TemplePlus/action_sequence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1716,7 +1716,7 @@ int ActionSequenceSystem::TrimPathToRemainingMoveLength(D20Actn* d20a, float rem
uint32_t ActionSequenceSystem::ActionCostNull(D20Actn* d20Actn, TurnBasedStatus* turnBasedStatus, ActionCostPacket* actionCostPacket)
{
actionCostPacket->hourglassCost = 0;
actionCostPacket->chargeAfterPicker = 0;
actionCostPacket->attackCost = 0;
actionCostPacket->moveDistCost = 0;
return 0;
}
Expand Down Expand Up @@ -3371,7 +3371,7 @@ BOOL ActionSequenceSystem::SimulsAdvance()

int ActionSequenceSystem::ActionCostFullAttack(D20Actn* d20, TurnBasedStatus* tbStat, ActionCostPacket* acp)
{
acp->chargeAfterPicker = 0;
acp->attackCost = 0;
acp->moveDistCost = 0;
acp->hourglassCost = 4;
int flags = d20->d20Caf;
Expand Down Expand Up @@ -3512,13 +3512,13 @@ int ActionSequenceSystem::ActionCostProcess(TurnBasedStatus* tbStat, D20Actn* d2
if (tbStat->surplusMoveDistance >= actCost.moveDistCost)
{
tbStat->surplusMoveDistance -= actCost.moveDistCost;
if ( actCost.chargeAfterPicker <= 0
|| actCost.chargeAfterPicker + tbStat->attackModeCode <= tbStat->baseAttackNumCode + tbStat->numBonusAttacks)
if ( actCost.attackCost <= 0
|| actCost.attackCost + tbStat->attackModeCode <= tbStat->baseAttackNumCode + tbStat->numBonusAttacks)
{
if ((int) tbStat->numBonusAttacks < actCost.chargeAfterPicker)
tbStat->attackModeCode += actCost.chargeAfterPicker;
if (actCost.attackCost > (int) tbStat->numBonusAttacks )
tbStat->attackModeCode += actCost.attackCost;
else
tbStat->numBonusAttacks -= actCost.chargeAfterPicker;
tbStat->numBonusAttacks -= actCost.attackCost;
if (tbStat->attackModeCode == tbStat->baseAttackNumCode && !tbStat->numBonusAttacks)
tbStat->tbsFlags &= ~TBSF_FullAttack;
result = AEC_OK;
Expand Down
26 changes: 15 additions & 11 deletions TemplePlus/d20.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2882,7 +2882,7 @@ ActionErrorCode D20ActionCallbacks::ActionCheckTripAttack(D20Actn* d20a, TurnBas

ActionErrorCode D20ActionCallbacks::ActionCostCastSpell(D20Actn * d20a, TurnBasedStatus * tbStat, ActionCostPacket * acp){
acp->hourglassCost = 0;
acp->chargeAfterPicker = 0;
acp->attackCost = 0;
acp->moveDistCost = 0.0f;
auto flags = d20a->d20Caf;
if ( (flags & D20CAF_FREE_ACTION) || !combatSys.isCombatActive()){
Expand Down Expand Up @@ -2946,7 +2946,7 @@ ActionErrorCode D20ActionCallbacks::ActionCostCastSpell(D20Actn * d20a, TurnBase
}

ActionErrorCode D20ActionCallbacks::ActionCostFullRound(D20Actn* d20a, TurnBasedStatus* tbStat, ActionCostPacket* acp){
acp->chargeAfterPicker = 0;
acp->attackCost = 0;
acp->moveDistCost = 0;
acp->hourglassCost = 4;
if ( (d20a->d20Caf & D20CAF_FREE_ACTION) || !combatSys.isCombatActive())
Expand Down Expand Up @@ -3772,7 +3772,7 @@ ActionErrorCode D20ActionCallbacks::TurnBasedStatusCheckPython(D20Actn* d20a, Tu
}

ActionErrorCode D20ActionCallbacks::ActionCostFullAttack(D20Actn * d20a, TurnBasedStatus * tbStat, ActionCostPacket * acp){
acp->chargeAfterPicker = 0;
acp->attackCost = 0;
acp->moveDistCost = 0;
acp->hourglassCost = 4;
//int flags = d20a->d20Caf;
Expand All @@ -3789,7 +3789,7 @@ ActionErrorCode D20ActionCallbacks::ActionCostFullAttack(D20Actn * d20a, TurnBas
}

ActionErrorCode D20ActionCallbacks::ActionCostPartialCharge(D20Actn * d20a, TurnBasedStatus * tbStat, ActionCostPacket * acp){
acp->chargeAfterPicker = 0;
acp->attackCost = 0;
acp->moveDistCost = 0;
acp->hourglassCost = 3;
if ((d20a->d20Caf & D20CAF_FREE_ACTION) || !combatSys.isCombatActive())
Expand All @@ -3803,6 +3803,10 @@ ActionErrorCode D20ActionCallbacks::ActionCostPython(D20Actn* d20a, TurnBasedSta
return (ActionErrorCode) d20Sys.GetPyActionCost(d20a, tbStat, acp);
}

/*
0x100910F0
Used in: Standard attack, Standard Ranged attack, Trip Attack, Touch Attack, Throw Weapon, Throw Grenade
*/
ActionErrorCode D20ActionCallbacks::ActionCostStandardAttack(D20Actn* d20a, TurnBasedStatus* tbStat, ActionCostPacket* acp){

if ( d20Sys.d20Query(d20a->d20APerformer, DK_QUE_HoldingCharge)
Expand All @@ -3813,12 +3817,12 @@ ActionErrorCode D20ActionCallbacks::ActionCostStandardAttack(D20Actn* d20a, Turn
}

acp->hourglassCost = 0;
acp->chargeAfterPicker = 0;
acp->attackCost = 0;
acp->moveDistCost = 0;

if (!(d20a->d20Caf & D20CAF_FREE_ACTION) && combatSys.isCombatActive())
{
acp->chargeAfterPicker = 1;
acp->attackCost = 1;

auto retainSurplusMoveDist = false;

Expand All @@ -3841,7 +3845,7 @@ ActionErrorCode D20ActionCallbacks::ActionCostStandardAttack(D20Actn* d20a, Turn
ActionErrorCode D20ActionCallbacks::ActionCostMoveAction(D20Actn *d20, TurnBasedStatus *tbStat, ActionCostPacket *acp)
{
acp->hourglassCost = 0;
acp->chargeAfterPicker = 0;
acp->attackCost = 0;
acp->moveDistCost = 0;
if (!(d20->d20Caf & D20CAF_FREE_ACTION) && combatSys.isCombatActive())
{
Expand All @@ -3857,7 +3861,7 @@ ActionErrorCode D20ActionCallbacks::ActionCostMoveAction(D20Actn *d20, TurnBased

ActionErrorCode D20ActionCallbacks::ActionCostNull(D20Actn* d20a, TurnBasedStatus* tbStat, ActionCostPacket* acp){
acp->hourglassCost = 0;
acp->chargeAfterPicker = 0;
acp->attackCost = 0;
acp->moveDistCost = 0;
return AEC_OK;
}
Expand All @@ -3869,21 +3873,21 @@ ActionErrorCode D20ActionCallbacks::ActionCostSwift(D20Actn* d20a, TurnBasedStat
}

acp->hourglassCost = 0;
acp->chargeAfterPicker = 0;
acp->attackCost = 0;
acp->moveDistCost = 0;
tbStat->tbsFlags |= TBSF_SwiftActionPerformed;
return AEC_OK;
}

ActionErrorCode D20ActionCallbacks::ActionCostStandardAction(D20Actn*, TurnBasedStatus*, ActionCostPacket*acp){
acp->hourglassCost = 2;
acp->chargeAfterPicker = 0;
acp->attackCost = 0;
acp->moveDistCost = 0;
return AEC_OK;
};

ActionErrorCode D20ActionCallbacks::ActionCostWhirlwindAttack(D20Actn* d20a, TurnBasedStatus* tbStat, ActionCostPacket*acp) {
acp->chargeAfterPicker = 0;
acp->attackCost = 0;
acp->moveDistCost = 0;
acp->hourglassCost = 4;
if ( ( d20a->d20Caf & D20CAF_FREE_ACTION) || !combatSys.isCombatActive()){
Expand Down
4 changes: 2 additions & 2 deletions TemplePlus/d20_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ enum class ActionCostType : int {
struct ActionCostPacket
{
int hourglassCost;
int chargeAfterPicker; // flag I think; is only set at stuff that requires using the picker it seems
int attackCost; // how many attacks does this consume when doing Full Attack? (0 if not relevant; haven't seen a value > 1)
float moveDistCost;

ActionCostPacket() { hourglassCost = 0; chargeAfterPicker = 0; moveDistCost = 0.0f; }
ActionCostPacket() { hourglassCost = 0; attackCost = 0; moveDistCost = 0.0f; }
};
//const auto TestSizeOfActionCostPacket = sizeof(ActionCostPacket); // should be 12 (0xC)

Expand Down