0.3.0 • Published 19 days ago

luxannas-spellbook v0.3.0

Weekly downloads
-
License
ISC
Repository
github
Last release
19 days ago

About

!CAUTION The library is currently WIP.

badge badge

An ALPHA version of the library calculating League of Legends spells and items properties.

The library is designed to resolve variables that may be found across League of Legends localization entries from both Data Dragon and Community Dragon (e.g. wdamage in <physicalDamage>{{ wdamage }} physical damage</physicalDamage>)

Basic usage

const context = await playerContext({championName: "Zyra"})
context.setLevel(3)

const passive = context.getPassiveSpell()

console.log(passive)

returns

[
  { name: 'SeedCooldown', value: 13, formula: '14 - 9 @level@' },
  {
    name: 'PlantDamage',
    value: 24,
    formula: '16 - 84 @level@ + 18% @total@ @abilityPower@'
  },
  {
    name: 'monstermod',
    value: 64.70588235294117,
    formula: '60 - 100 @level@'
  },
  { name: '{c951f1e1}', value: 48, formula: '50 - 33 @level@' }
]

Configuration

playerContext needs to be configured with an object:

NameRequiredTypeDescriptionDefault
championNameyesstringAny valid League champion name
sourceDataSourceChampion data source. Available values: DataSource.Web, DataSource.LocalDataSource.Web
customUristringAn URI used to locate a champion data. A path to the actual data is being resolved as ${customUri}/${championName}/${championName}.bin.json""

Default URI

DataSource.Local: src/test-data/champions/${championName}/${championName}.bin.json DataSource.Web: a Community Dragon server

Known issues

  • the lib does not calculate buff-dependent properties yet since there is no officially supported interface to obtain the buff status from the game;
  • it is yet needed to test the lib against Akali Q, Zyra passive, TF Q;
  • it is yet needed to test the percent missing health spells calculation behavior.

Roadmap

1) Fix current issues and implement minor features (e.g. percentage view and precision settings); 2) Implement item properties calculation; 3) Implement rune properties calculation; 4) TBD.

See also

0.3.0

19 days ago

0.2.1

21 days ago

0.2.0

21 days ago

0.2.2

21 days ago

0.1.1

1 month ago

0.1.0

1 month ago