Closed BryanSchuetz closed 4 years ago
I may have to cleanup some of the data in spells.json now that I'm looking at the whole thing.
This is a great start, very much appreciate the initial draft with pulling the spells into json definitions and everything. I think that we need to generalize this and organize it a bit more though.
something like:
src/
constants/
spells/
- index.js // wrapper for working with spells
- spells.json
that away when we add cmans, foes, whatever we decide, we have a path forward to consistency from the initial jump.
Got it. Well I'm not super sure what a wrapper would/should look like...but here's the spells.json
at least.
It would be so cool to have even thicker data to work with, like...
{
"name": "Spirit Warding I",
"number": "101",
"type": "defense",
"url": "https://gswiki.play.net/Spirit_Warding_I_(101)",
"quick_desc": "+10 TD",
"desc": "Spirit Warding I affords some minor protection against spell attacks, providing bonuses of +10 Spiritual Target Defense (TD) and +10 Bolt Spell Defensive Strength (DS)."
}
Having the duration for thresholds so that short duration spells do not seem so out of place in the UI would be really cool too, I think we can expand this idea a lot.
Should we merge this in and do a separate branch for adding the system to manipulate the spell UI to have the data-* classes?
So it doesn't get lost, this was Bryan's original code that did that bit: https://github.com/elanthia-online/illthorn/pull/87/commits/d8578210e75988ee393191df79ca9740dacf03f9#diff-760c2d22b4fa6dbcd42a6bd83bb59be2R28
Sounds good to me
On Thu, Jul 30, 2020, 00:08 Chris Coyier notifications@github.com wrote:
Should we merge this in and do a separate branch for adding the system to manipulate the spell UI to have the data-* classes?
So it doesn't get lost, this was Bryan's original code that did that bit: d857821#diff-760c2d22b4fa6dbcd42a6bd83bb59be2R28 https://github.com/elanthia-online/illthorn/commit/d8578210e75988ee393191df79ca9740dacf03f9#diff-760c2d22b4fa6dbcd42a6bd83bb59be2R28
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/elanthia-online/illthorn/pull/87#issuecomment-666089127, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIKHAR2QQ7MRHHVXEV7VG3R6DW37ANCNFSM4PCXY5JQ .
Basically, looks at
spell.name
to figure out how the user has flaggedShowSpellName
. Maps either the name or number toSpells
data and includes both inspan.spell
(e.g. "401 / Elemental Defense I"). It also addstype
to a data attribute for the parent list item (e.g. data-spell-type="defense"). So we can style them to distinguish...This kind of thing:
69