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

Spells on Stave of Palenqual and Puppeteer's Skull not implemented yet #1806

Open
DrudgeRobber opened this issue Apr 25, 2019 · 7 comments
Open

Comments

@DrudgeRobber
Copy link

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [x] feature request

The Stave of Palenqual (using the version with Avalanche added) and Puppeteer's Skull both throw "Avalanche/Wrath of the Puppeteer not implemented, yet!" errors on attempting to use their respective built in spells.

The Stave of Palenqual also seems to fizzle when attempting to cast it on monsters or NPCs. It only follows through to the "* not implemented, yet!" when attempting to cast it on another player character.

The Virindi Implant (Purple) seems to have a similar problem with fizzling on targets other than players.

Repro steps.

The log given by the failure.

Desired functionality.

Mention any other details that might be useful.

@ghost
Copy link

ghost commented May 21, 2019

For Wrath of the Puppeteer spell, "|| spellID == 2998" needs to be added to the Volley else if branch in SpellProjectile.GetProjectileSpellType(), as it is a bolt/volley hybrid spell. Three projectiles are fired but in succession, rather than as a group together, so that effect needs to be accounted for in code.

SpellIDs 1832 through 1838, which Avalanche is a part of, are spell projectile rain spells that are unique to other War Magic projectile spells, with nine or 12 projectiles that slam down from above the target in an area, and should only be usable outdoors. Those spell lines are a little wonky, as their spell.Power exceeds their item casters ItemSpellcrafts, so that probably needs to be accounted for, also.

Paralyzing Fear spell on Virindi Implant also exceeds the ItemSpellcraft of the caster item.

I imagine that ItemSpellcraft should probably only be used for resist checks and not for if an item has the "skill" to cast its spell. Setting magicSkill = 999, at line 334 in Player_Magic.cs, ensures that a caster item can successfully cast its own spells.

Lastly, the two WarMagic() overloads are probably sending an extra GameEventUseDone(), in the case of "spell not implemented, yet", as the cursor goes into perma-hourglass.

@Slushnas
Copy link
Contributor

I'm going to research these spells and see if I can get them added.

@gmriggs
Copy link
Collaborator

gmriggs commented May 21, 2019

"Those spell lines are a little wonky, as their spell.Power exceeds their item casters ItemSpellcrafts, so that probably needs to be accounted for, also."

i think we saw issues with this for other built-in spells before... even if the ItemSpellcraft was above the spell.Power, it would still sometimes fizzle. The built-in spell code was changed because of this awhile ago, so that built-in spells never fizzle.

The ItemSpellcraft ends up being the 'difficulty' the spell was cast with, ie. if I use a built-in spell on an item with ItemSpellcraft 250, when the target tries to resist, it would be resisting against skill level 250 there

@ghost
Copy link

ghost commented May 21, 2019

The Avalanche spell (really all of these rain spells) has a spell.Power of 320, but the item, as you mentioned, has a built-in skill of 250. Even with the -50 discount on spell.Power for difficulty calculation, it still ends up being greater than the item's skill level, so the spell automatically fails, and then fizzles. Currently, the line "if (isWeaponSpell && caster.ItemSpellcraft != null) magicSkill = caster.ItemSpellcraft;" is causing the instant spell cast failure for the item's spell.

@ghost
Copy link

ghost commented May 21, 2019

There isn't a lot of information to go on for these spells. For the Wrath of the Puppeteer, the spell has multiple projectiles but doesn't have a DimsOrigin.X > 1, so SpellProjectile.GetProjectileSpellType() was assigning it a Bolt type. However, in WarMagic(WorldObject target, Spell spell), the check didn't match any of the current criteria, ie. spell.NumProjectiles == 1 || spellType == SpellProjectile.ProjectileSpellType.Volley || spellType == SpellProjectile.ProjectileSpellType.Blast. The picture associated with the Puppeteer's Skull weapon shows the three projectiles firing in succession.

@gmriggs
Copy link
Collaborator

gmriggs commented May 21, 2019

Hmm, maybe that section should be changed to this:

            if (magicSkill > 0 && magicSkill >= (int)difficulty - 50)
            {
                var chance = 1.0f - SkillCheck.GetMagicSkillChance((int)magicSkill, (int)difficulty);
                var rng = ThreadSafeRandom.Next(0.0f, 1.0f);
                if (chance < rng)
                    castingPreCheckStatus = CastingPreCheckStatus.Success;
            }

            if (isWeaponSpell)
                castingPreCheckStatus = CastingPreCheckStatus.Success;

@ghost
Copy link

ghost commented May 21, 2019

Yes, that works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants