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
Fixes crash issue when AI party member casts Dominate Monster (aka 'S…
…uggestion') on enemy, e.g. summoned Balor from Skull
  • Loading branch information
Lei Chabolan committed Sep 10, 2022
commit 9b6d579830b2cde58267faa010a08f9bcf06be31
4 changes: 2 additions & 2 deletions TemplePlus/critter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ uint32_t LegacyCritterSystem::HasMet(objHndl critter, objHndl otherCritter) {
return addresses.HasMet(critter, otherCritter);
}

uint32_t LegacyCritterSystem::AddFollower(objHndl npc, objHndl pc, int unkFlag, bool asAiFollower) {
return addresses.AddFollower(npc, pc, unkFlag, asAiFollower);
uint32_t LegacyCritterSystem::AddFollower(objHndl npc, objHndl pc, int forcedFollower, bool asAiFollower) {
return addresses.AddFollower(npc, pc, forcedFollower, asAiFollower);
}

bool LegacyCritterSystem::FollowerAtMax(){
Expand Down
36 changes: 36 additions & 0 deletions TemplePlus/spell_condition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
#include "float_line.h"
#include "action_sequence.h"
#include "ai.h"
#include <party.h>
#include <ui/ui_systems.h>
#include <ui/ui_legacysystems.h>


void PyPerformTouchAttack_PatchedCallToHitProcessing(D20Actn * pd20A, D20Actn d20A, uint32_t savedesi, uint32_t retaddr, PyObject * pyObjCaller, PyObject * pyTupleArgs);
Expand Down Expand Up @@ -76,8 +79,13 @@ class SpellConditionFixes : public TempleFix {

static int SpellResistance_SpellResistanceMod(DispatcherCallbackArgs args);

static int SuggestionOnAdd(DispatcherCallbackArgs args);

void apply() override {

// Fix for when summoned Balor from skull casts suggestion
replaceFunction(0x100D01D0, SuggestionOnAdd);

// Magic Circle Taking Damage - didn't check that attacker is not null
replaceFunction(0x100C8D60, MagicCirclePreventDamage);

Expand Down Expand Up @@ -1468,3 +1476,31 @@ int SpellConditionFixes::SpellResistance_SpellResistanceMod(DispatcherCallbackAr
return 0;
}

int SpellConditionFixes::SuggestionOnAdd(DispatcherCallbackArgs args)
{
auto spellId = args.GetCondArg(0);
auto duration = args.GetCondArg(1);
auto arg2 = args.GetCondArg(2); // is 0...

if (!conds.AddTo(args.objHndCaller, "Charmed", { spellId, duration, arg2 })) {
logger->error("d20_mods_spells.c / _begin_spell_suggestion(): unable to add condition");
}
floatSys.FloatSpellLine(args.objHndCaller, 20018, FloatLineColor::Red); // Charmed!
auto partyLeader = party.GetConsciousPartyLeader();
SpellPacketBody pkt(spellId);
if (party.IsInParty(pkt.caster)) {
if (party.ObjIsAIFollower(pkt.caster)) {
critterSys.AddFollower(args.objHndCaller, /*partyLeader*/ pkt.caster, 1, 1);
}
else {
critterSys.AddFollower(args.objHndCaller, pkt.caster, 1, 0);
uiSystems->GetParty().Update();
}
}
else {
critterSys.AddFollower(args.objHndCaller, pkt.caster, 1, 1);
}
args.SetCondArg(2, 1);
return 0;
}