Anonymous

Module:Sandbox/Skills/data: Difference between revisions

From Melvor Idle
Support Ancient magic spells
m (Add item/monster IDs)
(Support Ancient magic spells)
Line 25: Line 25:
     attacksByID[a.id].items = []
     attacksByID[a.id].items = []
     attacksByID[a.id].monsters = []
     attacksByID[a.id].monsters = []
    attacksByID[a.id].spells = []
   }
   }
   // For each attack, build a list of items & monsters which use that attack
   // For each attack, build a list of items & monsters which use that attack
Line 39: Line 40:
         attacksByID[sp.id].monsters.push(monster.id)
         attacksByID[sp.id].monsters.push(monster.id)
       }
       }
    }
  }
  for (const spell of ANCIENT) {
    if (spell.specialAttack !== undefined) {
      attacksByID[spell.specialAttack.id].spells.push(['Ancient', spell.id])
     }
     }
   }
   }
Line 55: Line 61:
local attackData = {}
local attackData = {}


attackData
attackData


return attackData
return attackData