From 730e8f714ae7e3daefa0360d791071378cc77631 Mon Sep 17 00:00:00 2001 From: exane Date: Fri, 19 Jun 2015 21:53:48 +0200 Subject: [PATCH] fix morale boost + improved events --- assets/data/abilities.js | 90 ++--- client/js/client.js | 2 +- server/Battle.js | 81 ++-- server/Battleside.js | 12 +- server/Card.js | 41 +- server/Field.js | 12 +- test/spec/spec.js | 784 +++++++++++++++++++++++++++++++++++++-- test/src/PubSubSpec.js | 130 +++---- test/src/mainSpec.js | 1 + 9 files changed, 957 insertions(+), 196 deletions(-) diff --git a/assets/data/abilities.js b/assets/data/abilities.js index b3c7389..ee4197d 100644 --- a/assets/data/abilities.js +++ b/assets/data/abilities.js @@ -2,10 +2,10 @@ module.exports = { "agile": { cancelPlacement: true, - onBeforePlace: function(card) { + onBeforePlace: function(card){ var self = this; this.send("played:agile", {cardID: card.getID()}, true); - this.on("agile:setField", function(type) { + this.on("agile:setField", function(type){ self.off("agile:setField"); card.changeType(type) self.placeCard(card, { @@ -17,7 +17,7 @@ module.exports = { }, "medic": { waitResponse: true, - onAfterPlace: function(card) { + onAfterPlace: function(card){ var discard = this.getDiscard(); discard = this.filter(discard, { @@ -31,14 +31,24 @@ module.exports = { } }, "morale_boost": { - onAfterPlace: function(card) { - var field = this.field[card.getType()]; - var cards = field.get(); - cards.forEach(function(_card) { - if(_card.getID() == card.getID()) return; - if(_card.getRawPower() === -1) return; - _card.boost(1); + onEachCardPlace: function(card){ + var field = this.field[card.getType()]; + var id = card.getID(); + if(!field.isOnField(card)){ + field.get().forEach(function(_card){ + if(_card.getID() == id) return; + if(_card.getType() != card.getType()) return; + _card.setBoost(id, 0); + }) + this.off("EachCardPlace", card.getUidEvents("EachCardPlace")); + return; + } + + field.get().forEach(function(_card){ + if(_card.getID() == id) return; + if(_card.getType() != card.getType()) return; + _card.setBoost(id, 1); }) } }, @@ -51,13 +61,13 @@ module.exports = { var cardsDeck = this.deck.find("musterType", musterType); var cardsHand = this.hand.find("musterType", musterType); - cardsDeck.forEach(function(_card) { + cardsDeck.forEach(function(_card){ self.deck.removeFromDeck(_card); self.placeCard(_card, { suppress: "muster" }); }) - cardsHand.forEach(function(_card) { + cardsHand.forEach(function(_card){ self.hand.remove(_card); self.placeCard(_card, { suppress: "muster" @@ -86,7 +96,7 @@ module.exports = { } }, "weather_fog": { - onEachTurn: function(card) { + onEachTurn: function(card){ var targetRow = card.constructor.TYPE.RANGED; var forcedPower = 1; var field1 = this.field[targetRow].get(); @@ -94,12 +104,12 @@ module.exports = { var field = field1.concat(field2); - field.forEach(function(_card) { + field.forEach(function(_card){ if(_card.getRawAbility() == "hero") return; _card.setForcedPower(forcedPower); }); }, - onEachCardPlace: function(card) { + onEachCardPlace: function(card){ var targetRow = card.constructor.TYPE.RANGED; var forcedPower = 1; var field1 = this.field[targetRow].get(); @@ -107,14 +117,14 @@ module.exports = { var field = field1.concat(field2); - field.forEach(function(_card) { + field.forEach(function(_card){ if(_card.getRawAbility() == "hero") return; _card.setForcedPower(forcedPower); }); } }, "weather_rain": { - onEachTurn: function(card) { + onEachTurn: function(card){ var targetRow = card.constructor.TYPE.SIEGE; var forcedPower = 1; var field1 = this.field[targetRow].get(); @@ -122,7 +132,7 @@ module.exports = { var field = field1.concat(field2); - field.forEach(function(_card) { + field.forEach(function(_card){ if(_card.getRawAbility() == "hero") return; _card.setForcedPower(forcedPower); }); @@ -130,7 +140,7 @@ module.exports = { } }, "weather_frost": { - onEachTurn: function(card) { + onEachTurn: function(card){ var targetRow = card.constructor.TYPE.CLOSE_COMBAT; var forcedPower = 1; var field1 = this.field[targetRow].get(); @@ -138,7 +148,7 @@ module.exports = { var field = field1.concat(field2); - field.forEach(function(_card) { + field.forEach(function(_card){ if(_card.getRawAbility() == "hero") return; _card.setForcedPower(forcedPower); }); @@ -146,7 +156,7 @@ module.exports = { } }, "clear_weather": { - onAfterPlace: function(card) { + onAfterPlace: function(card){ var targetRow = card.constructor.TYPE.WEATHER; var field = this.field[targetRow].get(); @@ -157,38 +167,20 @@ module.exports = { replaceWith: true }, "foltest_leader1": { - onActivate: function() { + onActivate: function(){ var cards = this.deck.find("key", "impenetrable_fog") if(!cards.length) return; var card = this.deck.removeFromDeck(cards[0]); this.placeCard(card); } }, - "francesca_leader1": { - - }, - "francesca_leader2": { - - }, - "francesca_leader3": { - - }, - "francesca_leader4": { - - }, - "eredin_leader1": { - - }, - "eredin_leader2": { - - }, - "eredin_leader3": { - - }, - "eredin_leader4": { - - }, - "hero": { - - } + "francesca_leader1": {}, + "francesca_leader2": {}, + "francesca_leader3": {}, + "francesca_leader4": {}, + "eredin_leader1": {}, + "eredin_leader2": {}, + "eredin_leader3": {}, + "eredin_leader4": {}, + "hero": {} } \ No newline at end of file diff --git a/client/js/client.js b/client/js/client.js index 3f638ea..fb692c3 100644 --- a/client/js/client.js +++ b/client/js/client.js @@ -105,7 +105,7 @@ var SideView = Backbone.View.extend({ ''), templateCards: Handlebars.compile('{{#each this}}' + '
' + - '{{#if _boost}}+{{_boost}}{{/if}}' + + '{{#if boost}}+{{boost}}{{/if}}' + '' + '
' + '{{/each}}'), diff --git a/server/Battle.js b/server/Battle.js index 43bb566..ded116b 100644 --- a/server/Battle.js +++ b/server/Battle.js @@ -1,5 +1,6 @@ var Battleside = require("./Battleside"); var Card = require("./Card"); +var shortid = require("shortid"); var Battle = (function(){ @@ -39,8 +40,9 @@ var Battle = (function(){ r.init = function(){ /*PubSub.subscribe("update", this.update.bind(this));*/ - this.on("Update", this.update);/* - this.on("AfterPlace", this.checkAbilityOnAfterPlace)*/ + this.on("Update", this.update); + /* + this.on("AfterPlace", this.checkAbilityOnAfterPlace)*/ this.channel = this.socket.subscribe(this._id); @@ -57,11 +59,23 @@ var Battle = (function(){ r.start = function(){ this.p1.setLeadercard(); this.p2.setLeadercard(); - this.p1.draw(10); - this.p2.draw(10); + this.p1.draw(5); + this.p2.draw(5); this.p1.hand.add(Card("kaedweni_siege_expert")); this.p2.hand.add(Card("kaedweni_siege_expert")); + this.p1.hand.add(Card("ballista")); + this.p2.hand.add(Card("ballista")); + this.p1.hand.add(Card("ballista")); + this.p2.hand.add(Card("ballista")); + this.p1.hand.add(Card("ballista")); + this.p2.hand.add(Card("ballista")); + this.p1.hand.add(Card("ballista")); + this.p2.hand.add(Card("ballista")); + this.p1.hand.add(Card("ballista")); + this.p2.hand.add(Card("ballista")); + this.p1.hand.add(Card("decoy")); + this.p2.hand.add(Card("decoy")); /* this.p1.hand.add(Card("dun_banner_medic")); this.p2.hand.add(Card("dun_banner_medic")); @@ -70,11 +84,11 @@ var Battle = (function(){ /*this.p1.addToDiscard([Card("kaedweni_siege_expert")]); this.p2.addToDiscard([Card("kaedweni_siege_expert")]);*/ -/* - this.p1.hand.add(Card("decoy")); - this.p1.hand.add(Card("impenetrable_fog")); - this.p2.hand.add(Card("decoy")); - this.p2.hand.add(Card("impenetrable_fog"));*/ + /* + this.p1.hand.add(Card("decoy")); + this.p1.hand.add(Card("impenetrable_fog")); + this.p2.hand.add(Card("decoy")); + this.p2.hand.add(Card("impenetrable_fog"));*/ this.update(); @@ -151,19 +165,28 @@ var Battle = (function(){ }); } - r.runEvent = function(eventid, ctx, args){ + r.runEvent = function(eventid, ctx, args, uid){ ctx = ctx || this; + uid = uid || null; args = args || []; var event = "on" + eventid; if(!this.events[event]){ return; } - this.events[event].forEach(function(e){ - var obj = e; + + if(uid){ + var obj = this.events[event][uid]; obj.cb = obj.cb.bind(ctx) obj.cb.apply(ctx, obj.onArgs.concat(args)); - }); + } + else { + for(var _uid in this.events[event]) { + var obj = this.events[event][_uid]; + obj.cb = obj.cb.bind(ctx) + obj.cb.apply(ctx, obj.onArgs.concat(args)); + } + } this.update(); } @@ -171,6 +194,7 @@ var Battle = (function(){ ctx = ctx || null; args = args || []; var event = "on" + eventid; + var uid_event = shortid.generate(); var obj = {}; if(!ctx){ @@ -182,29 +206,32 @@ var Battle = (function(){ obj.onArgs = args; if(!(event in this.events)){ - this.events[event] = []; + /*this.events[event] = [];*/ + this.events[event] = {}; } if(typeof cb !== "function"){ throw new Error("cb not a function"); } - if(args){ - this.events[event].push(obj); - } + this.events[event][uid_event] = obj; - else { - this.events[event].push(obj); - } + return uid_event; } - r.off = function(eventid){ + r.off = function(eventid, uid){ + uid = uid || null; var event = "on" + eventid; if(!this.events[event]) return; - this.events[event].forEach(function(e){ - e = null; - }); - delete this.events[event]; + if(uid){ + this.events[event][uid] = null; + delete this.events[event][uid]; + return; + } + for(var _uid in this.events[event]){ + this.events[event][_uid] = null; + delete this.events[event][_uid]; + } } r.checkIfIsOver = function(){ @@ -230,14 +257,14 @@ var Battle = (function(){ return Math.random() > 0.5 ? this.p1 : this.p2; } - r.userLeft = function(sideName) { + r.userLeft = function(sideName){ var side = this[sideName]; side.foe.send("foe:left", null, true); } - r.shutDown = function() { + r.shutDown = function(){ this.channel = null; } diff --git a/server/Battleside.js b/server/Battleside.js index 3f9ee0e..fe50164 100644 --- a/server/Battleside.js +++ b/server/Battleside.js @@ -330,9 +330,11 @@ Battleside = (function(){ if(ability.changeSide){ obj.targetSide = this.foe; } + if(ability.onReset){ + this.on("Reset", ability.onReset, this, [card]) + } if(ability.replaceWith){ obj._cancelPlacement = true; - this.on("Decoy:replaceWith", function(replaceCard){ if(replaceCard.getType() == Card.TYPE.LEADER || replaceCard.getType() == Card.TYPE.WEATHER || @@ -345,6 +347,7 @@ Battleside = (function(){ field.replaceWith(replaceCard, card); + self.runEvent("EachCardPlace"); self.hand.add(replaceCard); self.hand.remove(card); @@ -354,11 +357,12 @@ Battleside = (function(){ }) } if(ability.onEachTurn){ - this.on("EachTurn", ability.onEachTurn, this, [card]) + var uid = this.on("EachTurn", ability.onEachTurn, this, [card]) + card._uidEvents["EachTurn"] = uid; } if(ability.onEachCardPlace){ - //PubSub.subscribe("onEachCardPlace", ability.onEachCardPlace.bind(this, card)); - this.on("EachCardPlace", ability.onEachCardPlace, this, [card]); + var uid = this.on("EachCardPlace", ability.onEachCardPlace, this, [card]); + card._uidEvents["EachCardPlace"] = uid; } this.update(); diff --git a/server/Card.js b/server/Card.js index 20efcfc..f1c1575 100644 --- a/server/Card.js +++ b/server/Card.js @@ -9,16 +9,15 @@ var Card = (function(){ /** * constructor here */ + this._uidEvents = {}; this.setDisabled(false); - this.channel = {}; this._key = key; this._data = CardData[key]; this._data.key = key; - this._boost = 0; + this._boost = {}; this._forcedPower = -1; this._init(); - }; var r = Card.prototype; /** @@ -44,8 +43,11 @@ var Card = (function(){ WEATHER: 5 }; - r.channel = null + r._uidEvents = null; + r.getUidEvents = function(key) { + return this._uidEvents[key]; + } r._init = function(){ this._id = ++Card.__id; @@ -57,20 +59,20 @@ var Card = (function(){ r.getPower = function(){ if(this._data.power === -1) return 0; if(this._forcedPower > -1){ - return (this._forcedPower > this._data.power ? this._data.power : this._forcedPower) + this._boost; + return (this._forcedPower > this._data.power ? this._data.power : this._forcedPower) + this.getBoost(); } - return this._data.power + this._boost; + return this._data.power + this.getBoost(); } r.getRawPower = function(){ return this._data.power; } - r.calculateBoost = function(){ + /*r.calculateBoost = function(){ this._boost = 0; for(var key in this._boosts) { var boost = this._boosts[key]; this.boost(boost.getPower()); } - } + }*/ r.setForcedPower = function(nr){ this._forcedPower = nr; } @@ -110,9 +112,23 @@ var Card = (function(){ return this._id; } - r.boost = function(nr){ - /*this.getPower(); //to recalculate this._power;*/ + /*r.boost = function(nr){ + this.getPower(); //to recalculate this._power; this._boost += nr; + }*/ + + r.getBoost = function() { + var res = 0; + for(var key in this._boost) { + res += this._boost[key]; + } + this.boost = res; + return res; + } + + r.setBoost = function(key, val) { + this._boost[key] = val; + this.getBoost(); //to recalculate this.boost } r.isDisabled = function(){ @@ -128,9 +144,10 @@ var Card = (function(){ return this._data[prop]; } - r.resetBoost = function(){ + r.reset = function(){ this._changedType = null; - this._boost = 0; + this._boost = {}; + this.boost = 0; } return Card; diff --git a/server/Field.js b/server/Field.js index 056811e..43ffefd 100644 --- a/server/Field.js +++ b/server/Field.js @@ -48,10 +48,14 @@ var Field = (function(){ return -1; } + r.isOnField = function(card){ + return this.getPosition(card) >= 0; + } + r.replaceWith = function(oldCard, newCard){ var index = this.getPosition(oldCard); this._cards[index] = newCard; - oldCard.resetBoost(); + oldCard.reset(); return oldCard; } @@ -63,10 +67,10 @@ var Field = (function(){ return -1; } - r.removeAll = function() { + r.removeAll = function(){ var tmp = this._cards.slice(); - tmp.forEach(function(card) { - card.resetBoost(); + tmp.forEach(function(card){ + card.reset(); }) this._cards = []; return tmp; diff --git a/test/spec/spec.js b/test/spec/spec.js index 397d82e..1fd11d2 100644 --- a/test/spec/spec.js +++ b/test/spec/spec.js @@ -34,14 +34,25 @@ module.exports = { } }, "morale_boost": { - onAfterPlace: function onAfterPlace(card) { - var field = this.field[card.getType()]; - var cards = field.get(); - cards.forEach(function (_card) { - if (_card.getID() == card.getID()) return; - if (_card.getRawPower() === -1) return; - _card.boost(1); + onEachCardPlace: function onEachCardPlace(card) { + var field = this.field[card.getType()]; + var id = card.getID(); + if (!field.isOnField(card)) { + field.get().forEach(function (_card) { + if (_card.getID() == id) return; + if (_card.getType() != card.getType()) return; + _card.setBoost(id, 0); + }); + /*this.off("EachCardPlace")*/ + this.off("EachCardPlace", card.getUidEvents("EachCardPlace")); + return; + } + + field.get().forEach(function (_card) { + if (_card.getID() == id) return; + if (_card.getType() != card.getType()) return; + _card.setBoost(id, 1); }); } }, @@ -450,7 +461,7 @@ module.exports = { "havekar_healer": { name: "Havekar Healer", power: 0, - ability: "morale_boost", + ability: "medic", img: "healer", faction: "Scoia'tael", type: 1 @@ -935,6 +946,317 @@ module.exports = { }; },{}],4:[function(require,module,exports){ +'use strict'; + +var randomFromSeed = require('./random/random-from-seed'); + +var ORIGINAL = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-'; +var alphabet; +var previousSeed; + +var shuffled; + +function reset() { + shuffled = false; +} + +function setCharacters(_alphabet_) { + if (!_alphabet_) { + if (alphabet !== ORIGINAL) { + alphabet = ORIGINAL; + reset(); + } + return; + } + + if (_alphabet_ === alphabet) { + return; + } + + if (_alphabet_.length !== ORIGINAL.length) { + throw new Error('Custom alphabet for shortid must be ' + ORIGINAL.length + ' unique characters. You submitted ' + _alphabet_.length + ' characters: ' + _alphabet_); + } + + var unique = _alphabet_.split('').filter(function(item, ind, arr){ + return ind !== arr.lastIndexOf(item); + }); + + if (unique.length) { + throw new Error('Custom alphabet for shortid must be ' + ORIGINAL.length + ' unique characters. These characters were not unique: ' + unique.join(', ')); + } + + alphabet = _alphabet_; + reset(); +} + +function characters(_alphabet_) { + setCharacters(_alphabet_); + return alphabet; +} + +function setSeed(seed) { + randomFromSeed.seed(seed); + if (previousSeed !== seed) { + reset(); + previousSeed = seed; + } +} + +function shuffle() { + if (!alphabet) { + setCharacters(ORIGINAL); + } + + var sourceArray = alphabet.split(''); + var targetArray = []; + var r = randomFromSeed.nextValue(); + var characterIndex; + + while (sourceArray.length > 0) { + r = randomFromSeed.nextValue(); + characterIndex = Math.floor(r * sourceArray.length); + targetArray.push(sourceArray.splice(characterIndex, 1)[0]); + } + return targetArray.join(''); +} + +function getShuffled() { + if (shuffled) { + return shuffled; + } + shuffled = shuffle(); + return shuffled; +} + +/** + * lookup shuffled letter + * @param index + * @returns {string} + */ +function lookup(index) { + var alphabetShuffled = getShuffled(); + return alphabetShuffled[index]; +} + +module.exports = { + characters: characters, + seed: setSeed, + lookup: lookup, + shuffled: getShuffled +}; + +},{"./random/random-from-seed":10}],5:[function(require,module,exports){ +'use strict'; +var alphabet = require('./alphabet'); + +/** + * Decode the id to get the version and worker + * Mainly for debugging and testing. + * @param id - the shortid-generated id. + */ +function decode(id) { + var characters = alphabet.shuffled(); + return { + version: characters.indexOf(id.substr(0, 1)) & 0x0f, + worker: characters.indexOf(id.substr(1, 1)) & 0x0f + }; +} + +module.exports = decode; + +},{"./alphabet":4}],6:[function(require,module,exports){ +'use strict'; + +var randomByte = require('./random/random-byte'); + +function encode(lookup, number) { + var loopCounter = 0; + var done; + + var str = ''; + + while (!done) { + str = str + lookup( ( (number >> (4 * loopCounter)) & 0x0f ) | randomByte() ); + done = number < (Math.pow(16, loopCounter + 1 ) ); + loopCounter++; + } + return str; +} + +module.exports = encode; + +},{"./random/random-byte":9}],7:[function(require,module,exports){ +'use strict'; + +var alphabet = require('./alphabet'); +var encode = require('./encode'); +var decode = require('./decode'); +var isValid = require('./is-valid'); + +// Ignore all milliseconds before a certain time to reduce the size of the date entropy without sacrificing uniqueness. +// This number should be updated every year or so to keep the generated id short. +// To regenerate `new Date() - 0` and bump the version. Always bump the version! +var REDUCE_TIME = 1426452414093; + +// don't change unless we change the algos or REDUCE_TIME +// must be an integer and less than 16 +var version = 5; + +// if you are using cluster or multiple servers use this to make each instance +// has a unique value for worker +// Note: I don't know if this is automatically set when using third +// party cluster solutions such as pm2. +var clusterWorkerId = require('./util/cluster-worker-id') || 0; + +// Counter is used when shortid is called multiple times in one second. +var counter; + +// Remember the last time shortid was called in case counter is needed. +var previousSeconds; + +/** + * Generate unique id + * Returns string id + */ +function generate() { + + var str = ''; + + var seconds = Math.floor((Date.now() - REDUCE_TIME) * 0.001); + + if (seconds === previousSeconds) { + counter++; + } else { + counter = 0; + previousSeconds = seconds; + } + + str = str + encode(alphabet.lookup, version); + str = str + encode(alphabet.lookup, clusterWorkerId); + if (counter > 0) { + str = str + encode(alphabet.lookup, counter); + } + str = str + encode(alphabet.lookup, seconds); + + return str; +} + + +/** + * Set the seed. + * Highly recommended if you don't want people to try to figure out your id schema. + * exposed as shortid.seed(int) + * @param seed Integer value to seed the random alphabet. ALWAYS USE THE SAME SEED or you might get overlaps. + */ +function seed(seedValue) { + alphabet.seed(seedValue); + return module.exports; +} + +/** + * Set the cluster worker or machine id + * exposed as shortid.worker(int) + * @param workerId worker must be positive integer. Number less than 16 is recommended. + * returns shortid module so it can be chained. + */ +function worker(workerId) { + clusterWorkerId = workerId; + return module.exports; +} + +/** + * + * sets new characters to use in the alphabet + * returns the shuffled alphabet + */ +function characters(newCharacters) { + if (newCharacters !== undefined) { + alphabet.characters(newCharacters); + } + + return alphabet.shuffled(); +} + + +// Export all other functions as properties of the generate function +module.exports = generate; +module.exports.generate = generate; +module.exports.seed = seed; +module.exports.worker = worker; +module.exports.characters = characters; +module.exports.decode = decode; +module.exports.isValid = isValid; + +},{"./alphabet":4,"./decode":5,"./encode":6,"./is-valid":8,"./util/cluster-worker-id":11}],8:[function(require,module,exports){ +'use strict'; +var alphabet = require('./alphabet'); + +function isShortId(id) { + if (!id || typeof id !== 'string' || id.length < 6 ) { + return false; + } + + var characters = alphabet.characters(); + var invalidCharacters = id.split('').map(function(char){ + if (characters.indexOf(char) === -1) { + return char; + } + }).join('').split('').join(''); + + return invalidCharacters.length === 0; +} + +module.exports = isShortId; + +},{"./alphabet":4}],9:[function(require,module,exports){ +'use strict'; + +var crypto = window.crypto || window.msCrypto; // IE 11 uses window.msCrypto + +function randomByte() { + if (!crypto || !crypto.getRandomValues) { + return Math.floor(Math.random() * 256) & 0x30; + } + var dest = new Uint8Array(1); + crypto.getRandomValues(dest); + return dest[0] & 0x30; +} + +module.exports = randomByte; + +},{}],10:[function(require,module,exports){ +'use strict'; + +// Found this seed-based random generator somewhere +// Based on The Central Randomizer 1.3 (C) 1997 by Paul Houle (houle@msc.cornell.edu) + +var seed = 1; + +/** + * return a random number based on a seed + * @param seed + * @returns {number} + */ +function getNextValue() { + seed = (seed * 9301 + 49297) % 233280; + return seed/(233280.0); +} + +function setSeed(_seed_) { + seed = _seed_; +} + +module.exports = { + nextValue: getNextValue, + seed: setSeed +}; + +},{}],11:[function(require,module,exports){ +'use strict'; + +module.exports = 0; + +},{}],12:[function(require,module,exports){ // Underscore.js 1.8.3 // http://underscorejs.org // (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors @@ -2484,7 +2806,276 @@ module.exports = { } }.call(this)); -},{}],5:[function(require,module,exports){ +},{}],13:[function(require,module,exports){ +"use strict"; + +var Battleside = require("./Battleside"); +var Card = require("./Card"); +var shortid = require("shortid"); + +var Battle = (function () { + var Battle = function Battle(id, p1, p2, socket) { + if (!(this instanceof Battle)) { + return new Battle(id, p1, p2, socket); + } + /** + * constructor here + */ + this.events = {}; + this._id = id; + this._user1 = p1; + this._user2 = p2; + this.socket = socket; + this.channel = {}; + }; + var r = Battle.prototype; + /** + * methods && properties here + * r.property = null; + * r.getProperty = function() {...} + */ + + r.p1 = null; + r.p2 = null; + r._user1 = null; + r._user2 = null; + r.turn = 0; + + r.socket = null; + r.channel = null; + + r._id = null; + + r.events = null; + + r.init = function () { + /*PubSub.subscribe("update", this.update.bind(this));*/ + this.on("Update", this.update); + /* + this.on("AfterPlace", this.checkAbilityOnAfterPlace)*/ + + this.channel = this.socket.subscribe(this._id); + this.p1 = Battleside(this._user1.getName(), 0, this, this._user1); + this.p2 = Battleside(this._user2.getName(), 1, this, this._user2); + this.p1.foe = this.p2; + this.p2.foe = this.p1; + this.p1.setUpWeatherFieldWith(this.p2); + + this.start(); + }; + + r.start = function () { + this.p1.setLeadercard(); + this.p2.setLeadercard(); + this.p1.draw(5); + this.p2.draw(5); + + this.p1.hand.add(Card("kaedweni_siege_expert")); + this.p2.hand.add(Card("kaedweni_siege_expert")); + this.p1.hand.add(Card("ballista")); + this.p2.hand.add(Card("ballista")); + this.p1.hand.add(Card("ballista")); + this.p2.hand.add(Card("ballista")); + this.p1.hand.add(Card("ballista")); + this.p2.hand.add(Card("ballista")); + this.p1.hand.add(Card("ballista")); + this.p2.hand.add(Card("ballista")); + this.p1.hand.add(Card("ballista")); + this.p2.hand.add(Card("ballista")); + this.p1.hand.add(Card("decoy")); + this.p2.hand.add(Card("decoy")); + /* + this.p1.hand.add(Card("dun_banner_medic")); + this.p2.hand.add(Card("dun_banner_medic")); + this.p1.hand.add(Card("isengrim_faoiltiarnah")); + this.p2.hand.add(Card("isengrim_faoiltiarnah"));*/ + + /*this.p1.addToDiscard([Card("kaedweni_siege_expert")]); + this.p2.addToDiscard([Card("kaedweni_siege_expert")]);*/ + /* + this.p1.hand.add(Card("decoy")); + this.p1.hand.add(Card("impenetrable_fog")); + this.p2.hand.add(Card("decoy")); + this.p2.hand.add(Card("impenetrable_fog"));*/ + + this.update(); + + /*PubSub.subscribe("nextTurn", this.switchTurn.bind(this));*/ + this.on("NextTurn", this.switchTurn); + + this.switchTurn(Math.random() > 0.5 ? this.p1 : this.p2); + }; + + r.switchTurn = function (side, __flag) { + __flag = typeof __flag == "undefined" ? 0 : 1; + + if (!(side instanceof Battleside)) { + console.trace("side is not a battleside!"); + return; + } + if (side.isPassing()) { + if (__flag) { + return this.startNextRound(); + } + return this.switchTurn(side.foe, 1); + } + + this.runEvent("EachTurn"); + this.runEvent("Turn" + side.getID()); + console.log("current Turn: ", side.getName()); + }; + + r.startNextRound = function () { + var loser = this.checkRubies(); + if (this.checkIfIsOver()) { + console.log("its over!"); + this.update(); + return; + } + + this.p1.resetNewRound(); + this.p2.resetNewRound(); + + console.log("start new round!"); + + this.update(); + this.switchTurn(loser); + }; + + r.update = function () { + this._update(this.p1); + this._update(this.p2); + }; + + r._update = function (p) { + p.send("update:info", { + info: p.getInfo(), + leader: p.field[Card.TYPE.LEADER].get()[0] + }); + p.send("update:hand", { + cards: JSON.stringify(p.hand.getCards()) + }); + p.send("update:fields", { + close: p.field[Card.TYPE.CLOSE_COMBAT], + ranged: p.field[Card.TYPE.RANGED], + siege: p.field[Card.TYPE.SIEGE], + weather: p.field[Card.TYPE.WEATHER] + }); + }; + + r.send = function (event, data) { + this.channel.publish({ + event: event, + data: data + }); + }; + + r.runEvent = function (eventid, ctx, args, uid) { + ctx = ctx || this; + uid = uid || null; + args = args || []; + var event = "on" + eventid; + + if (!this.events[event]) { + return; + } + + if (uid) { + var obj = this.events[event][uid]; + obj.cb = obj.cb.bind(ctx); + obj.cb.apply(ctx, obj.onArgs.concat(args)); + } else { + for (var _uid in this.events[event]) { + var obj = this.events[event][_uid]; + obj.cb = obj.cb.bind(ctx); + obj.cb.apply(ctx, obj.onArgs.concat(args)); + } + } + this.update(); + }; + + r.on = function (eventid, cb, ctx, args) { + ctx = ctx || null; + args = args || []; + var event = "on" + eventid; + var uid_event = shortid.generate(); + + var obj = {}; + if (!ctx) { + obj.cb = cb; + } else { + obj.cb = cb.bind(ctx); + } + obj.onArgs = args; + + if (!(event in this.events)) { + /*this.events[event] = [];*/ + this.events[event] = {}; + } + + if (typeof cb !== "function") { + throw new Error("cb not a function"); + } + + this.events[event][uid_event] = obj; + + return uid_event; + }; + + r.off = function (eventid, uid) { + uid = uid || null; + var event = "on" + eventid; + if (!this.events[event]) return; + if (uid) { + this.events[event][uid] = null; + delete this.events[event][uid]; + return; + } + for (var _uid in this.events[event]) { + this.events[event][_uid] = null; + delete this.events[event][_uid]; + } + }; + + r.checkIfIsOver = function () { + return !(this.p1.getRubies() && this.p2.getRubies()); + }; + + r.checkRubies = function () { + var scoreP1 = this.p1.getScore(); + var scoreP2 = this.p2.getScore(); + + if (scoreP1 > scoreP2) { + this.p2.removeRuby(); + return this.p2; + } + if (scoreP2 > scoreP1) { + this.p1.removeRuby(); + return this.p1; + } + + //tie + this.p1.removeRuby(); + this.p2.removeRuby(); + return Math.random() > 0.5 ? this.p1 : this.p2; + }; + + r.userLeft = function (sideName) { + var side = this[sideName]; + + side.foe.send("foe:left", null, true); + }; + + r.shutDown = function () { + this.channel = null; + }; + + return Battle; +})(); + +module.exports = Battle; + +},{"./Battleside":14,"./Card":15,"shortid":7}],14:[function(require,module,exports){ "use strict"; var DeckData = require("../assets/data/deck"); @@ -2811,9 +3402,11 @@ Battleside = (function () { if (ability.changeSide) { obj.targetSide = this.foe; } + if (ability.onReset) { + this.on("Reset", ability.onReset, this, [card]); + } if (ability.replaceWith) { obj._cancelPlacement = true; - this.on("Decoy:replaceWith", function (replaceCard) { if (replaceCard.getType() == Card.TYPE.LEADER || replaceCard.getType() == Card.TYPE.WEATHER || replaceCard.getType() == Card.TYPE.SPECIAL) { return; @@ -2823,6 +3416,7 @@ Battleside = (function () { var field = self.field[replaceCard.getType()]; field.replaceWith(replaceCard, card); + self.runEvent("EachCardPlace"); self.hand.add(replaceCard); self.hand.remove(card); @@ -2832,11 +3426,12 @@ Battleside = (function () { }); } if (ability.onEachTurn) { - this.on("EachTurn", ability.onEachTurn, this, [card]); + var uid = this.on("EachTurn", ability.onEachTurn, this, [card]); + card._uidEvents["EachTurn"] = uid; } if (ability.onEachCardPlace) { - //PubSub.subscribe("onEachCardPlace", ability.onEachCardPlace.bind(this, card)); - this.on("EachCardPlace", ability.onEachCardPlace, this, [card]); + var uid = this.on("EachCardPlace", ability.onEachCardPlace, this, [card]); + card._uidEvents["EachCardPlace"] = uid; } this.update(); @@ -2931,7 +3526,7 @@ Battleside = (function () { module.exports = Battleside; -},{"../assets/data/deck":3,"./Card":6,"./Deck":7,"./Field":8,"./Hand":9,"underscore":4}],6:[function(require,module,exports){ +},{"../assets/data/deck":3,"./Card":15,"./Deck":16,"./Field":17,"./Hand":18,"underscore":12}],15:[function(require,module,exports){ "use strict"; var CardData = require("../assets/data/cards"); @@ -2945,12 +3540,12 @@ var Card = (function () { /** * constructor here */ + this._uidEvents = {}; this.setDisabled(false); - this.channel = {}; this._key = key; this._data = CardData[key]; this._data.key = key; - this._boost = 0; + this._boost = {}; this._forcedPower = -1; this._init(); }; @@ -2978,7 +3573,11 @@ var Card = (function () { WEATHER: 5 }; - r.channel = null; + r._uidEvents = null; + + r.getUidEvents = function (key) { + return this._uidEvents[key]; + }; r._init = function () { this._id = ++Card.__id; @@ -2990,20 +3589,20 @@ var Card = (function () { r.getPower = function () { if (this._data.power === -1) return 0; if (this._forcedPower > -1) { - return this._forcedPower + this._boost; + return (this._forcedPower > this._data.power ? this._data.power : this._forcedPower) + this.getBoost(); } - return this._data.power + this._boost; + return this._data.power + this.getBoost(); }; r.getRawPower = function () { return this._data.power; }; - r.calculateBoost = function () { + /*r.calculateBoost = function(){ this._boost = 0; - for (var key in this._boosts) { + for(var key in this._boosts) { var boost = this._boosts[key]; this.boost(boost.getPower()); } - }; + }*/ r.setForcedPower = function (nr) { this._forcedPower = nr; }; @@ -3043,9 +3642,23 @@ var Card = (function () { return this._id; }; - r.boost = function (nr) { - /*this.getPower(); //to recalculate this._power;*/ + /*r.boost = function(nr){ + this.getPower(); //to recalculate this._power; this._boost += nr; + }*/ + + r.getBoost = function () { + var res = 0; + for (var key in this._boost) { + res += this._boost[key]; + } + this.boost = res; + return res; + }; + + r.setBoost = function (key, val) { + this._boost[key] = val; + this.getBoost(); //to recalculate this.boost }; r.isDisabled = function () { @@ -3061,9 +3674,10 @@ var Card = (function () { return this._data[prop]; }; - r.resetBoost = function () { + r.reset = function () { this._changedType = null; - this._boost = 0; + this._boost = {}; + this.boost = 0; }; return Card; @@ -3071,7 +3685,7 @@ var Card = (function () { module.exports = Card; -},{"../assets/data/abilities":1,"../assets/data/cards":2}],7:[function(require,module,exports){ +},{"../assets/data/abilities":1,"../assets/data/cards":2}],16:[function(require,module,exports){ "use strict"; var Card = require("./Card"); @@ -3180,7 +3794,7 @@ var Deck = (function () { module.exports = Deck; -},{"./Card":6}],8:[function(require,module,exports){ +},{"./Card":15}],17:[function(require,module,exports){ "use strict"; var Field = (function () { @@ -3233,10 +3847,14 @@ var Field = (function () { return -1; }; + r.isOnField = function (card) { + return this.getPosition(card) >= 0; + }; + r.replaceWith = function (oldCard, newCard) { var index = this.getPosition(oldCard); this._cards[index] = newCard; - oldCard.resetBoost(); + oldCard.reset(); return oldCard; }; @@ -3251,7 +3869,7 @@ var Field = (function () { r.removeAll = function () { var tmp = this._cards.slice(); tmp.forEach(function (card) { - card.resetBoost(); + card.reset(); }); this._cards = []; return tmp; @@ -3262,7 +3880,7 @@ var Field = (function () { module.exports = Field; -},{}],9:[function(require,module,exports){ +},{}],18:[function(require,module,exports){ /*var $ = require("jquery");*/ /* var CardManager = require("./CardManager");*/ /* var PubSub = require("./pubsub");*/ @@ -3347,7 +3965,102 @@ var Hand = (function () { module.exports = Hand; -},{"./Card":6}],10:[function(require,module,exports){ +},{"./Card":15}],19:[function(require,module,exports){ +"use strict"; + +var Battle = require("../../server/Battle"); +var Card = require("../../server/Card"); +var data = require("../../assets/data/abilities"); + +describe("pubsub", function () { + var battle, card1, card2; + + beforeEach(function () { + battle = {}; + battle.runEvent = Battle.prototype.runEvent; + battle.on = Battle.prototype.on; + battle.off = Battle.prototype.off; + battle.events = {}; + battle.update = function () {}; + + card1 = Card("kaedweni_siege_expert"); + card2 = Card("dun_banner_medic"); + }); + + it("on: has correct arguments", function () { + //this.on("EachTurn", ability.onEachTurn, this, [card]) + + battle.on("EachTurn", function (card) { + expect(card).toEqual(card1); + }, this, [card1]); + battle.runEvent("EachTurn"); + }); + it("runEvent: has correct arguments", function () { + //this.on("EachTurn", ability.onEachTurn, this, [card]) + battle.on("EachTurn", function (c) { + expect(c).toEqual(card1); + }); + battle.runEvent("EachTurn", null, [card1]); + }); + it("on + runEvent: has correct arguments", function () { + //this.on("EachTurn", ability.onEachTurn, this, [card]) + battle.on("EachTurn", function (c1, c2) { + expect(c1).toEqual(card1); + expect(c2).toEqual(card2); + }, null, [card1]); + battle.runEvent("EachTurn", null, [card2]); + }); + it("test context", function () { + + battle.on("EachTurn", function (card) { + expect(card.id).toEqual(card1.id); + expect(this.id).toEqual(card2.id); + }, card2, [card1]); + battle.runEvent("EachTurn"); + }); + it("test context", function () { + + battle.on("EachTurn", function (card) { + expect(card.id).toEqual(card1.id); + expect(this.id).toEqual(card2.id); + }, null, [card1]); + battle.runEvent("EachTurn", card2); + }); + it("test context", function () { + + battle.on("EachTurn", function (card) { + expect(card.id).toEqual(card1.id); + expect(this.id).toEqual(card1.id); + }, card1, [card1]); + battle.runEvent("EachTurn", card2); + }); + + it("should handle off correctly", function () { + var cb1 = function cb1() {}, + cb2 = function cb2() {}; + var obj = { + cb1: cb1, + cb2: cb2 + }; + + spyOn(obj, "cb1"); + spyOn(obj, "cb2"); + + var uid1 = battle.on("EachCardPlace", obj.cb1, battle, [card1]); + var uid2 = battle.on("EachCardPlace", obj.cb2, battle, [card2]); + + battle.off("EachCardPlace", uid2); + battle.runEvent("EachCardPlace"); + + expect(obj.cb1).toHaveBeenCalled(); + expect(obj.cb2).not.toHaveBeenCalled(); + + /*battle.off("EachCardPlace", uid1); + expect(battle.events).toEqual({});*/ + }); +}); + +},{"../../assets/data/abilities":1,"../../server/Battle":13,"../../server/Card":15}],20:[function(require,module,exports){ "use strict"; var Card = require("../../server/Card"); @@ -3381,13 +4094,14 @@ describe("filter", function () { }); }); -},{"../../assets/data/abilities":1,"../../server/Battleside":5,"../../server/Card":6}],11:[function(require,module,exports){ +},{"../../assets/data/abilities":1,"../../server/Battleside":14,"../../server/Card":15}],21:[function(require,module,exports){ "use strict"; require("./filterSpec"); +require("./PubSubSpec"); (function main() {})(); -},{"./filterSpec":10}]},{},[11])(11) +},{"./PubSubSpec":19,"./filterSpec":20}]},{},[21])(21) }); -//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyaWZ5L25vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJZOi9odGRvY3MvdGltLzIwMTUvZ3dlbnQvYXNzZXRzL2RhdGEvYWJpbGl0aWVzLmpzIiwiWTovaHRkb2NzL3RpbS8yMDE1L2d3ZW50L2Fzc2V0cy9kYXRhL2NhcmRzLmpzIiwiWTovaHRkb2NzL3RpbS8yMDE1L2d3ZW50L2Fzc2V0cy9kYXRhL2RlY2suanMiLCJub2RlX21vZHVsZXMvdW5kZXJzY29yZS91bmRlcnNjb3JlLmpzIiwiWTovaHRkb2NzL3RpbS8yMDE1L2d3ZW50L3NlcnZlci9CYXR0bGVzaWRlLmpzIiwiWTovaHRkb2NzL3RpbS8yMDE1L2d3ZW50L3NlcnZlci9DYXJkLmpzIiwiWTovaHRkb2NzL3RpbS8yMDE1L2d3ZW50L3NlcnZlci9EZWNrLmpzIiwiWTovaHRkb2NzL3RpbS8yMDE1L2d3ZW50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RodXMsIGBcIjVcImAgaXNcbiAgICAgICAgLy8gZXF1aXZhbGVudCB0byBgbmV3IFN0cmluZyhcIjVcIilgLlxuICAgICAgICByZXR1cm4gJycgKyBhID09PSAnJyArIGI7XG4gICAgICBjYXNlICdbb2JqZWN0IE51bWJlcl0nOlxuICAgICAgICAvLyBgTmFOYHMgYXJlIGVxdWl2YWxlbnQsIGJ1dCBub24tcmVmbGV4aXZlLlxuICAgICAgICAvLyBPYmplY3QoTmFOKSBpcyBlcXVpdmFsZW50IHRvIE5hTlxuICAgICAgICBpZiAoK2EgIT09ICthKSByZXR1cm4gK2IgIT09ICtiO1xuICAgICAgICAvLyBBbiBgZWdhbGAgY29tcGFyaXNvbiBpcyBwZXJmb3JtZWQgZm9yIG90aGVyIG51bWVyaWMgdmFsdWVzLlxuICAgICAgICByZXR1cm4gK2EgPT09IDAgPyAxIC8gK2EgPT09IDEgLyBiIDogK2EgPT09ICtiO1xuICAgICAgY2FzZSAnW29iamVjdCBEYXRlXSc6XG4gICAgICBjYXNlICdbb2JqZWN0IEJvb2xlYW5dJzpcbiAgICAgICAgLy8gQ29lcmNlIGRhdGVzIGFuZCBib29sZWFucyB0byBudW1lcmljIHByaW1pdGl2ZSB2YWx1ZXMuIERhdGVzIGFyZSBjb21wYXJlZCBieSB0aGVpclxuICAgICAgICAvLyBtaWxsaXNlY29uZCByZXByZXNlbnRhdGlvbnMuIE5vdGUgdGhhdCBpbnZhbGlkIGRhdGVzIHdpdGggbWlsbGlzZWNvbmQgcmVwcmVzZW50YXRpb25zXG4gICAgICAgIC8vIG9mIGBOYU5gIGFyZSBub3QgZXF1aXZhbGVudC5cbiAgICAgICAgcmV0dXJuICthID09PSArYjtcbiAgICB9XG5cbiAgICB2YXIgYXJlQXJyYXlzID0gY2xhc3NOYW1lID09PSAnW29iamVjdCBBcnJheV0nO1xuICAgIGlmICghYXJlQXJyYXlzKSB7XG4gICAgICBpZiAodHlwZW9mIGEgIT0gJ29iamVjdCcgfHwgdHlwZ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ZpZWxcIikpO1xyXG4gICAgY2FyZHMucHVzaChDYXJkKFwiaXNlbmdyaW1fZmFvaWx0aWFybmFoXCIpKTtcclxuICAgIGNhcmRzLnB1c2goQ2FyZChcImRlY295XCIpKTtcclxuICB9KVxyXG5cclxuICBpdChcIml0IHNob3VsZCBmaWx0ZXIgaGVyb2VzIG91dFwiLCBmdW5jdGlvbigpe1xyXG4gICAgdmFyIHJlcyA9IGZpbHRlcihjYXJkcywge1xyXG4gICAgICBcImFiaWxpdHlcIjogXCJoZXJvXCJcclxuICAgIH0pXHJcbiAgICBleHBlY3QocmVzLmxlbmd0aCkudG9CZSgyKTtcclxuICB9KVxyXG5cclxuICBpdChcIml0IHNob3VsZCBmaWx0ZXIgaGVybyBhbmQgc3BlY2lhbCBjYXJkcyBvdXRcIiwgZnVuY3Rpb24oKXtcclxuICAgIHZhciByZXMgPSBmaWx0ZXIoY2FyZHMsIHtcclxuICAgICAgXCJhYmlsaXR5XCI6IFwiaGVyb1wiLFxyXG4gICAgICBcInR5cGVcIjogQ2FyZC5UWVBFLlNQRUNJQUxcclxuICAgIH0pXHJcbiAgICBleHBlY3QocmVzLmxlbmd0aCkudG9CZSgxKTtcclxuICB9KVxyXG5cclxuXHJcbn0pIiwicmVxdWlyZShcIi4vZmlsdGVyU3BlY1wiKTtcclxucmVxdWlyZShcIi4vUHViU3ViU3BlY1wiKTtcclxuXHJcbihmdW5jdGlvbiBtYWluKCl7XHJcblxyXG59KSgpO1xyXG4iXX0= diff --git a/test/src/PubSubSpec.js b/test/src/PubSubSpec.js index 136ad40..1b9951d 100644 --- a/test/src/PubSubSpec.js +++ b/test/src/PubSubSpec.js @@ -1,96 +1,98 @@ -describe("pubsub", function() { - var battle; +var Battle = require("../../server/Battle"); +var Card = require("../../server/Card"); +var data = require("../../assets/data/abilities"); - beforeEach(function() { - battle = Battle(); +describe("pubsub", function(){ + var battle, card1, card2; + + beforeEach(function(){ + battle = {}; + battle.runEvent = Battle.prototype.runEvent; + battle.on = Battle.prototype.on; + battle.off = Battle.prototype.off; + battle.events = {}; + battle.update = function() {}; + + card1 = Card("kaedweni_siege_expert"); + card2 = Card("dun_banner_medic"); }); - it("on: has correct arguments", function() { + it("on: has correct arguments", function(){ //this.on("EachTurn", ability.onEachTurn, this, [card]) - var CARD = { - _id: 1, - _name: "cardy" - } - battle.on("EachTurn", function(card) { - expect(card).toEqual(CARD); - }, this, [CARD]); + battle.on("EachTurn", function(card){ + expect(card).toEqual(card1); + }, this, [card1]); battle.runEvent("EachTurn"); - }) - it("runEvent: has correct arguments", function() { - //this.on("EachTurn", ability.onEachTurn, this, [card]) - var CARD = { - _id: 1, - _name: "cardy" - } - battle.on("EachTurn", function(card) { - expect(card).toEqual(CARD); + + }) + it("runEvent: has correct arguments", function(){ + //this.on("EachTurn", ability.onEachTurn, this, [card]) + battle.on("EachTurn", function(c){ + expect(c).toEqual(card1); }); - battle.runEvent("EachTurn", null, [CARD]); + battle.runEvent("EachTurn", null, [card1]); }) - it("on + runEvent: has correct arguments", function() { + it("on + runEvent: has correct arguments", function(){ //this.on("EachTurn", ability.onEachTurn, this, [card]) - var CARD = { - _id: 1, - _name: "cardy" - } - var CARD2 = { - _id: 2, - _name: "cardooo" - } - - battle.on("EachTurn", function(card1, card2) { - expect(card1).toEqual(CARD); - expect(card2).toEqual(CARD2); - }, null, [CARD]); - battle.runEvent("EachTurn", null, [CARD2]); + battle.on("EachTurn", function(c1, c2){ + expect(c1).toEqual(card1); + expect(c2).toEqual(card2); + }, null, [card1]); + battle.runEvent("EachTurn", null, [card2]); }) - it("test context", function() { - //this.on("EachTurn", ability.onEachTurn, this, [card]) - var Card = function(id, name){ - this.id = id; - this.name = name; - } - var card1 = new Card(1, "cardy"); - var card2 = new Card(2, "cardoo"); + it("test context", function(){ - battle.on("EachTurn", function(card) { + battle.on("EachTurn", function(card){ expect(card.id).toEqual(card1.id); expect(this.id).toEqual(card2.id); }, card2, [card1]); battle.runEvent("EachTurn"); }) - it("test context", function() { - //this.on("EachTurn", ability.onEachTurn, this, [card]) - var Card = function(id, name){ - this.id = id; - this.name = name; - } - var card1 = new Card(1, "cardy"); - var card2 = new Card(2, "cardoo"); + it("test context", function(){ - battle.on("EachTurn", function(card) { + battle.on("EachTurn", function(card){ expect(card.id).toEqual(card1.id); expect(this.id).toEqual(card2.id); }, null, [card1]); battle.runEvent("EachTurn", card2); }) - it("test context", function() { - //this.on("EachTurn", ability.onEachTurn, this, [card]) - var Card = function(id, name){ - this.id = id; - this.name = name; - } - var card1 = new Card(1, "cardy"); - var card2 = new Card(2, "cardoo"); + it("test context", function(){ - battle.on("EachTurn", function(card) { + battle.on("EachTurn", function(card){ expect(card.id).toEqual(card1.id); expect(this.id).toEqual(card1.id); }, card1, [card1]); battle.runEvent("EachTurn", card2); }) + it("should handle off correctly", function() { + var cb1 = function(){}, cb2 = function() {}; + var obj = { + cb1: cb1, + cb2: cb2 + } + + spyOn(obj, "cb1"); + spyOn(obj, "cb2"); + + + var uid1 = battle.on("EachCardPlace", obj.cb1, battle, [card1]); + var uid2 = battle.on("EachCardPlace", obj.cb2, battle, [card2]); + + + battle.off("EachCardPlace", uid2); + battle.runEvent("EachCardPlace"); + + + expect(obj.cb1).toHaveBeenCalled(); + expect(obj.cb2).not.toHaveBeenCalled(); + + /*battle.off("EachCardPlace", uid1); + + expect(battle.events).toEqual({});*/ + }) + }); diff --git a/test/src/mainSpec.js b/test/src/mainSpec.js index b5add0c..fbe8f19 100644 --- a/test/src/mainSpec.js +++ b/test/src/mainSpec.js @@ -1,4 +1,5 @@ require("./filterSpec"); +require("./PubSubSpec"); (function main(){