elanthia-online / illthorn

Electron-based FE
18 stars 10 forks source link

Adds details to active spells list #87

Closed BryanSchuetz closed 4 years ago

BryanSchuetz commented 4 years ago

Basically, looks at spell.name to figure out how the user has flagged ShowSpellName. Maps either the name or number to Spells data and includes both in span.spell (e.g. "401 / Elemental Defense I"). It also adds type 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:

Screen Shot 2020-07-20 at 3 37 37 PM

69

BryanSchuetz commented 4 years ago

I may have to cleanup some of the data in spells.json now that I'm looking at the whole thing.

ondreian commented 4 years ago

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.

BryanSchuetz commented 4 years ago

Got it. Well I'm not super sure what a wrapper would/should look like...but here's the spells.json at least.

chriscoyier commented 4 years ago

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)."
}
ondreian commented 4 years ago

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.

chriscoyier commented 4 years ago

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

ondreian commented 4 years ago

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 .