Fixed generated loot always indicating "Level 1"
This commit is contained in:
parent
1ad7572bda
commit
5861deca6d
8
TODO
8
TODO
|
@ -3,6 +3,8 @@
|
|||
* Character sheet: disable interaction during battle (except for loot screen)
|
||||
* Character sheet: paginate loot and shop items
|
||||
* Character sheet: improve eye-catching for shop and loot section
|
||||
* Character sheet: equipping an item without the requirements make it disappear
|
||||
* Character sheet: display requirements on equipment tooltips
|
||||
* Shops: add equipment pricing, with usage depreciation
|
||||
* Add permanent effects to ship models to ease balancing
|
||||
* Ships should start battle in formation to force them to move
|
||||
|
@ -17,7 +19,7 @@
|
|||
* Drones: add tooltip
|
||||
* Drones: add hull points and take area damage
|
||||
* Show power usage/recovery in action bar, on action hover
|
||||
* More sound effects
|
||||
* More sound effects (but battle sounds should be vibration only, we are in space !)
|
||||
* Add a battle log display
|
||||
* Organize arena objects and information in layers
|
||||
* Prevent arena effects information (eg. "shield -36") to overflow out of the arena
|
||||
|
@ -29,6 +31,7 @@
|
|||
* Merge identical sticky effects
|
||||
* Handle effects overflowing ship tooltip when too numerous
|
||||
* Add a fleet evaluator to make balanced fleets
|
||||
* Allow to skip animations and AI delays in battle
|
||||
* Mobile: think UI layout so that fingers do not block the view (right and left handed)
|
||||
* Mobile: display tooltips larger and on the side of screen where the finger is not
|
||||
* Mobile: targetting in two times, using a draggable target indicator
|
||||
|
@ -39,8 +42,9 @@
|
|||
* TacticalAI: add pauses to not play too quickly
|
||||
* TacticalAI: replace BullyAI
|
||||
* Map: restore fog of war
|
||||
* Map: a star system should have an average level
|
||||
* Map: add information on current star/location + information on hovered location
|
||||
* Map: add shops and shipyards
|
||||
* Map: generate random shops
|
||||
* Map: remove jump links that cross the radius of other systems
|
||||
* Map: disable interaction (zoom, selection) while moving/jumping
|
||||
* Menu: fix background stars aggregating at right side when the game is not focused
|
||||
|
|
|
@ -10,6 +10,18 @@ module TS.SpaceTac.Specs {
|
|||
}
|
||||
|
||||
describe("LootTemplate", () => {
|
||||
it("generates equipment with correct information", function () {
|
||||
let template = new LootTemplate(SlotType.Power, "Power Generator", "A great power generator !");
|
||||
let result = template.generate(2, EquipmentQuality.PREMIUM);
|
||||
|
||||
expect(result.slot_type).toEqual(SlotType.Power);
|
||||
expect(result.code).toEqual("powergenerator");
|
||||
expect(result.name).toEqual("Power Generator");
|
||||
expect(result.level).toEqual(2);
|
||||
expect(result.quality).toEqual(EquipmentQuality.PREMIUM);
|
||||
expect(result.description).toEqual("A great power generator !");
|
||||
});
|
||||
|
||||
it("applies requirements on skills", function () {
|
||||
let template = new LootTemplate(SlotType.Hull, "Hull");
|
||||
template.setSkillsRequirements({ "skill_energy": 1, "skill_gravity": istep(2, istep(1)) });
|
||||
|
|
|
@ -102,10 +102,10 @@ module TS.SpaceTac {
|
|||
* Generate a new equipment of a given level and quality
|
||||
*/
|
||||
generate(level: number, quality = EquipmentQuality.COMMON, random = RandomGenerator.global): Equipment {
|
||||
let result = new Equipment();
|
||||
let result = new Equipment(this.slot, (this.name || "").toLowerCase().replace(/ /g, ""));
|
||||
|
||||
result.slot_type = this.slot;
|
||||
result.code = (this.name || "").toLowerCase().replace(/ /g, "");
|
||||
result.level = level;
|
||||
result.quality = quality;
|
||||
result.name = this.name;
|
||||
result.description = this.description;
|
||||
|
||||
|
|
Loading…
Reference in a new issue