7th-saga/web/static/spells.js
2021-02-21 20:37:37 -08:00

85 lines
2.7 KiB
JavaScript

(function(exports) {
const attackSpell = (name, mp, power, element, multiple) => {
return {
type: 'Attack',
name,
mp,
power,
element,
targets: multiple ? 'multi' : 'single',
};
};
const effectSpell = (name, mp, element, effect, multiple) => {
return {
type: 'Effect',
name,
mp,
element,
effect,
targets: multiple ? 'multi' : 'single',
};
};
const healSpell = (name, mp, healingPower, effect) => {
return {
type: 'Healing',
name,
mp,
healingPower,
effect,
targets: 'single',
};
};
const supportSpell = (name, mp, effect, locations) => {
return {
type: 'Support',
name,
mp,
effect,
locations,
targets: 'single',
};
};
exports.spells = [
attackSpell('Fire1', 3, 30, 'Fire'),
attackSpell('Fire2', 12, 70, 'Fire'),
attackSpell('Ice1', 3, 36, 'Ice'),
attackSpell('Ice2', 12, 80, 'Ice'),
attackSpell('Laser1', 3, 30, 'Thunder'),
attackSpell('Laser2', 10, 50, 'Thunder'),
attackSpell('Laser3', 20, 100, 'Thunder'),
attackSpell('Firebird', 14, 30, 'Fire', true),
attackSpell('Fireball', 32, 50, 'Fire', true),
attackSpell('Blizzard1', 14, 34, 'Ice', true),
attackSpell('Blizzard2', 32, 60, 'Ice', true),
attackSpell('Thunder1', 10, 40, 'Thunder', true),
attackSpell('Thunder2', 40, 75, 'Thunder', true),
effectSpell('Petrify', 10, 'Debuff', 'Petrification'),
effectSpell('Poison', 0, 'Debuff', 'Poison (monsters only)'),
effectSpell('Defense2', 5, 'Debuff', 'Halves guard'),
effectSpell('HPCatcher', 6, 'Debuff', 'Drains up to 50 HP and heals caster'),
effectSpell('MPCatcher', 8, 'Debuff', 'Drains up to 40 MP and heals caster'),
effectSpell('Vacuum1', 30, 'Vacuum', 'Instant death'),
effectSpell('Vacuum2', 60, 'Vacuum', 'Instant death', true),
healSpell('Heal1', 4, 40, 'Restores 40 HP'),
healSpell('Heal2', 18, 90, 'Restores 90 HP'),
healSpell('Heal3', 34, 'max', 'Restores all HP'),
healSpell('Elixir', 120, 'max', 'Restores all HP and MP'),
healSpell('Revive1', 40, 'max', 'Restores all HP to dead ally, fails ~50% of the time'),
healSpell('Revive2', 90, 'max', 'Restores all HP to dead ally, always succeeds'),
supportSpell('Purify', 8, 'Removes petrification and poison', ['Battle', 'Map']),
supportSpell('Defense1', 5, 'Halves physical damage from enemy', ['Battle']),
supportSpell('Power', 6, 'Doubles power', ['Battle']),
supportSpell('Agility', 3, 'Increases Speed by 30', ['Battle']),
supportSpell('F.Shield', 16, 'Nullifies next attack spell', ['Battle']),
supportSpell('Protect', 20, 'Nullifies next Vacuum spell', ['Battle']),
supportSpell('Exit', 30, 'Escape cave/dungeon immediately', ['Map']),
];
}(typeof(module) !== 'undefined' ? module.exports : window.saga));