« first day (271 days earlier)      last day (3295 days later) » 

Um, yeah. @Duga I think this is OK. Maybe I won't create a pull request next time for something like this.
 
[Cardshifter/Cardshifter] build #830 for commit 45c0e569 from pull request #195 to branch js-card-data-loader errored
@Phrancis, your build reported bad status: Errored!
 
Figured as much
 
[Cardshifter/Cardshifter] build #829 for commit 3c9467ad from pull request #194 to branch js passed
[Cardshifter/Cardshifter] build #828 for commit d158b7f1 on branch js passed
 
1:14 AM
> This appears to have completed now.
 
 
6 hours later…
6:52 AM
hey
 
 
2 hours later…
9:00 AM
@Simon, don't forget to fix Facebook Graph 2.0 in Minesweeper for Android!
 
 
2 hours later…
10:35 AM
@Duga I certainly hope today will be the last day that you have to say that.
 
@SimonAndréForsberg There's an easy way and a hard way to make that happen
 
11:20 AM
gaaah, now I need to make a "feature image" of 1024x500 pixels for Google Play store... just because I want to update my app
 
11:37 AM
TTQW!!
 
 
2 hours later…
1:30 PM
Hey :D
 
heg @Marc-Andre
 
heg @skiwi!
 
hog is it going?
 
good and you :D ?
 
Tired, vut good
 
2:05 PM
And how is your keyboard, @skiwi?
 
@SimonAndréForsberg Tired, vut good
2
lol
 
Monking!
I mean...Bonking
 
To go along with the apparent keyboard issues today ;)
 
2:20 PM
@SimonAndréForsberg The keyboard is vood
 
 
2 hours later…
4:46 PM
@SimonAndréForsberg What attributes other than NAME are currently supported in ECSAttributeMap?
 
@sᴉɔuɐɹɥԀ FLAVOR - see github.com/Cardshifter/Cardshifter/blob/…
What are you working on, @sᴉɔuɐɹɥԀ?
 
Right now, mostly on BTW.Job, if I get a bit of free time this afternoon I'm starting on trying to process some of that JSON data and pass it to ECSResource/Attribute Maps
(based on the JS you wrote in test.js)
 
5:09 PM
@SimonAndréForsberg In JS, can you do if (foo === undefined) { do this } else { do that } ?
(the "undefined" part)
 
@sᴉɔuɐɹɥԀ okay. not entirely sure what/how, but good luck :)
@sᴉɔuɐɹɥԀ I think so, yes.
 
Let's try... if it works, it'd be a good way to filter through a JSON to skip non-existent attributes
YAY
var testJson = {
    foo: [
            { bar: 1 }
        ]
};

var test1 = testJson.foo[0].bar;
var test2 = testJson.foo[0].fizz;

console.log(test1); // 1
console.log(test2); // undefined

if (test2 === undefined) {
    console.log("It works!");
} else {
    console.log("It doesn't work :(");
}
> 1
undefined
It works!
@SimonAndréForsberg How does the game "know" whether or not a card can be scrapped? (i.e., Whether it is a Mech or not)... Is it a matter of setting SCRAP = 0 to tell that is cannot be scrapped, or is there more to it?
 
5:25 PM
@sᴉɔuɐɹɥԀ I think at this moment it's only about the SCRAP value
 
/**
 * @param field {string} - The field to map resource to. Can be one of the following:
 * MAX_HEALTH, SNIPER, DOUBLE_ATTACK, TAUNT, DENY_COUNTERATTACK, HEALTH, MANA, MANA_MAX, SCRAP,
 * ATTACK, MANA_COST, SCRAP_COST, ENCHANTMENTS_ACTIVE, SICKNESS, ATTACK_AVAILABLE
 * @param value {int} - The value to map to the resource.
 */
function mapCardResource(field, value) {
    var entity = zone.getOwner().getGame().newEntity();
    ECSResourceMap.createFor(entity)..set(PhrancisResources.field, value);
This is untested but my idea is to loop through the JSON card library, and then check for resources/attributes and map them as they are defined (by calling one of those two functions), and then add the card to a zone after each loop is completed
<lunch>
 
@sᴉɔuɐɹɥԀ hmm.... It kinda sounds like you're trying to accomplish what @skiwi's card-loader already does.
and PhrancisResources.field won't work like that.
 
5:48 PM
Ah, OK. Has to be called explicitly each time eh?
I looked at the card loader and couldn't make heads or tails of it... certainly not something I would expect a modder to be able to modify, but if you think we should just use that and keep that logic in the Java source, I don't have a problem with it
 
@sᴉɔuɐɹɥԀ there are tricks to make it work without using the explicit fields. We might want to make a bit of changes for the resources though, I am not completely happy with the PhrancisResources enum.
 
Well, I'll leave that up to you and adapt the JS as needed, not sure what you have in mind
 
@sᴉɔuɐɹɥԀ The card loader that @skiwi made is not meant to be modified. It's meant to be used. Although I agree that at the moment using it is not really optimal, and it probably needs to be improved for it to be usable as we want it to be.
 
6:03 PM
OK
Is this piece of JS code you wrote not needed then?
/**
 * @params {Object} zone - Zone to which to add cards & attributes to.
 */
function addCards(zone) {
	var entity = zone.getOwner().getGame().newEntity();
	ECSResourceMap.createFor(entity)
		.set(PhrancisResources.HEALTH, 5)
		.set(PhrancisResources.MAX_HEALTH, 5)
		.set(PhrancisResources.ATTACK, 1)
		.set(PhrancisResources.SCRAP, 3)
		.set(PhrancisResources.MANA_COST, 2)
		.set(PhrancisResources.SICKNESS, 1)
		.set(PhrancisResources.TAUNT, 1)
		.set(PhrancisResources.ATTACK_AVAILABLE, 1);
	ECSAttributeMap.createFor(entity).set(Attributes.NAME, "Testing Thing");
 
@sᴉɔuɐɹɥԀ that piece of code will be replaced by something that can load cards with the JSON-like format.
 
i.e., skiwi's card loader? Or am I missing something?
 
and that code is essentially just a stub, as it only provides one card
 
That's what I had figured :)
 
I don't think @skiwi's card loader is 100% adapted for the format of your CardData.js, it is a good step in the right direction though.
 
6:08 PM
Alright. So for right now, I should just skip this part entirely, if I'm getting what you are saying?
 
I think so, probably, yes, unfortunately.
 
Unfortunately?
 
Well, I don't like telling you to not work on something
 
I had an idea...
We can use JSX on the server
It's like JS, but less crappy
You can transform it to regular JS by passing it through some converter, so it's still JS in the end
And another note, Django + React uses an interesting approach
 
@skiwi JSX? 1. What is that? 2. What is the benefit of it?
 
6:17 PM
You can use JSX files and render your dynamic web-pages server-side and send those to the client, then directly after that you render your page client-side for the JS functions, etc.
 
Are we talking Cardshifter now?
 
That last statement nope
That's more for web pages
 
For Cardshifter web site or for @Duga Web Interface or for what?
 
I don't have anything specific in mind, we'll be using it for the uni project though
It's main feature that works together with ReactJS is that you can directly return DOM elements
return (<div>Hello World!</div>);
It's quite interesting I must say
I haven't looked at the full feature-set yet, but it's supposed to fix flaws in JS
 
6 mins ago, by skiwi
We can use JSX on the server
 
6:23 PM
class _Main {
    static function main(args : string[]) : void {
        log "Hello, world!";
    }
}
 
"the server" made me think you had something specific in mind
 
@SimonAndréForsberg Ah yes, because JSX is supposed to be used server-side, we can use on the Cardshifter server (or support it), instead of plain JS files
Though JSX seems to be based on ECMAScript 6, whereas JS is stuck on ECMAScript 5 since ages
Found some tutorial: jsx.github.io/doc/tutorial.html
 
@skiwi And you expect it to work with Nashorn and Java 8 and everything?
 
@SimonAndréForsberg Yes, you compile JSX files into JS files and then it's just JS
At least that's how far I understand it
(Disclaimer: I may be wrong.)
It looks surprisingly lot similar to Java
> JSX is a class-based object-oriented language, and its class model is similar to Java.
That might explain something
Technically browsers can also support text/jsx
 
@skiwi We do want modding to be easy though, right? I don't think telling modders to compile JSX files into JS files is going to help with that.
 
6:30 PM
@SimonAndréForsberg The server would need to take care of that
 
Here's my simple argument: everyone knows some JavaScript. Most people don't even know what JSX is, let alone how to write and compile it...
 
^^ agreed
Sorry, @skiwi.
 
It's so much of a feature request, just sharing something interesting
 
Hey, I had written short proof-of-concept code for the loader, just to see how it would look. Even if we end up not using it, nothing lost, but just wanted to show what I had in mind
function mapCardData (cardLibrary) {
    for (var entityIndex in cardLibrary.entities) {
        var entity = zone.getOwner().getGame().newEntity();
        var value = undefined;

        value = entities[entityIndex].name;
        if (value === undefined) {
            ECSAttributeMap.createFor(entity).set(Attributes.NAME, "no name");
        } else {
            ECSAttributeMap.createFor(entity).set(Attributes.NAME, value);
        }

        value = entities[entityIndex].creature;
        if (value !== undefined) {
 
I'd use JSX if only for being able to use lambdas
 
6:34 PM
I like the fact that JSX exists, and it might be something I would want to use for something else, but I think it would only make things even more complicated for Cardshifter.
2
 
@sᴉɔuɐɹɥԀ I gotta say that I am impressed by your JS skills.
Unfortunately, that loader there is not very flexible as it currently looks. I'm thinking that we need to write something that is much more flexible than that.
@sᴉɔuɐɹɥԀ Whatever happened to 'stargreed'?
 
@SimonAndréForsberg Thank you, means a lot coming from you :)
I agree it's not really flexible and not very DRY, I mostly like that it is simple and logical, so if a modder wanted to change the default behavior, or anything like that, it would be a breeze to change the loader written that way
 
\[[**Cardshifter/Cardshifter**](https://github.com/Cardshifter/Cardshifter)\] [**Phrancis**](https://github.com/Phrancis) pushed commit [**ab6e402f**](https://github.com/Cardshifter/Cardshifter/commit/ab6e402ff9b4621fc120a81c9b88f4a73ca6cab2) to [**js-card-data-loader**](https://github.com/Cardshifter/Cardshifter/tree/js-card-data-loader): Update CardDataLoader.js

JS-based card loader proof of concept
 
is undefined a special value in javascript?
 
6:45 PM
Yeah
var testJson = {
    foo: [
            { bar: 1 }
        ]
};

var test1 = testJson.foo[0].bar;
var test2 = testJson.foo[0].fizz;

console.log(test1); // 1
console.log(test2); // undefined
^^ undefined is used when you're trying to reference something that doesn't exist
 
7:02 PM
 
7:15 PM
\[[**Cardshifter/Cardshifter**](https://github.com/Cardshifter/Cardshifter)\] [**Phrancis**](https://github.com/Phrancis) pushed commit [**2aae9bc4**](https://github.com/Cardshifter/Cardshifter/commit/2aae9bc402dcfd4c7b3680046205b6ae0cfafa69) to [**js-card-data-loader**](https://github.com/Cardshifter/Cardshifter/tree/js-card-data-loader): Update CardDataLoader.js

Added game configuration concept code, added JSDoc throughout
\[[**Cardshifter/Cardshifter**](https://github.com/Cardshifter/Cardshifter)\] [**Phrancis**](https://github.com/Phrancis) pushed commit [**0daebd41**](https://github.com/Cardshifter/Cardshifter/commit/0daebd4199a013807b65a9d93c794feee92437cd) to [**js-card-data-loader**](https://github.com/Cardshifter/Cardshifter/tree/js-card-data-loader): Update test.js

Deleted stub card loading concept code
 
^^ @SimonAndréForsberg @skiwi @bazola @Marc-Andre Show the love :)
 
in VBA, 19 secs ago, by Simon André Forsberg
@Mat'sMug How am I supposed to know? I've never used @RubberDuck!
 
Me neither, I've seen screenshots though, and wrote a little VBA myself
 
So many frameworks and languages... why si ther enot one that just works?
I try to stay away from VBA
 
7:31 PM
 
VBA is mostly good for one and only one thing: Microsoft Office programming. Turns out, a lot of people need to program different things (especially in Excel and Access) so it's nice that someone is working to improve that crappy VBA IDE.
 
I'm starting to think that if this at some poitn gets way more serious we need to move away from Travis and move into Jenkins on a VPS, as it's just so much faster lol
VPS/DS + GitLab + Jenkins seems sooooo much cheaper than GitHub EE + Travis EE
 
@skiwi ambiguous identifier: this
 
@SimonAndréForsberg this = Cardshifter
But it's not something we should think about right now
 
7:42 PM
2 hours ago, by Simon André Forsberg
@sᴉɔuɐɹɥԀ The card loader that @skiwi made is not meant to be modified. It's meant to be used. Although I agree that at the moment using it is not really optimal, and it probably needs to be improved for it to be usable as we want it to be.
@skiwi ^^ How difficult would it be to adapt your card loader to the JSON format that we just put together for the game?
 
@sᴉɔuɐɹɥԀ Link?
 
That file looks familiar
What's the data format you just put together though?
 
the file linked is the format.
The big problem (or at least the biggest problem) with @skiwi's loader is that it is used from inside Java
 
@SimonAndréForsberg Oh, there's two links, didn't see
What's the big problem with that? ^^
I see mostly attributes/resources, but what's exactly the deal with effects?
 
7:48 PM
@skiwi I haven't got that far yet :)
 
Then how woudl I know if we can work with this? :P
 
effects would be things that are defined in JS, at least for now
 
yesterday, by sᴉɔuɐɹɥԀ
Perhaps an attempt to make it look more "organized" but may be overcomplicating
 
@sᴉɔuɐɹɥԀ Can you give a source example?
 
Actually, no, I can't :\
 
7:50 PM
I'm not quite sure if I follow the effects yet
 
yesterday, by Simon André Forsberg
{
  name: "Some Card",
  values: {
    health: 1,
    attack: 1
  },
  onEndOfTurn: {
      chance: {
          probability: 0.5,
          action: {
              draw: { target: "self" }
          }
      }
  }
}
^^ just imagine if onEndOfTurn was inside effects (or we could get rid of the effects group and use the above format)
 
Sure the loader can do some things, but you'd need to heavily modify it
One plus if we use a fixed design is that we can create POJO's on the Java side and convert that JS (maybe can be interpreted as JSON?) to Java objects
 
@skiwi What kind of POJOs? For what?
 
@SimonAndréForsberg Or maybe that's not a good idea
 
7:57 PM
We'd need some way though of extracting the JS object-tree-levels into a chain of Java objects
 
2 mins ago, by Simon André Forsberg
@skiwi What kind of POJOs? For what?
 
@SimonAndréForsberg I was thinking to convert the object defined iin onEndOfTurn into something we could use
 
@skiwi If I remember correctly, JS object-tree-levels can already be accessed from Java. Alternatively, the accessing could be done from JS.
 
They can be accessed, yes, but we would need to extract some kind of structure instead of using the raw calls
TTGTB
Or well, at least to try to be in in an hour
TTGGTB (Time To Get Going To Bed)
 
8:35 PM
\[[**Cardshifter/Cardshifter**](https://github.com/Cardshifter/Cardshifter)\] [**Phrancis**](https://github.com/Phrancis) pushed commit [**3406075c**](https://github.com/Cardshifter/Cardshifter/commit/3406075c902620a35aa46eb77e6da838d0d2be18) to [**js-card-data-loader**](https://github.com/Cardshifter/Cardshifter/tree/js-card-data-loader): Update CardData.js

Removed "effects" sub-objects
 
@SimonAndréForsberg quick question... For cards that would not have a particular resource, e.g. health or mana cost or whatever, would it be expected that that would be set to 0 or rather that it simply not be mapped at all?
 
@sᴉɔuɐɹɥԀ not mapped at all, I'd say. Especially if the card is for example a spell. I wouldn't even expect to see a health property on a Spell!!
 
Any specific exceptions in particular (besides SCRAP which we already addressed)
BTW, I asked Nick (GreyFox) what he thought of the two different card loader ideas, here is what he responded:
> The first one is easy enough to read and grasp, it doesn’t seem to be too intensive from a general standpoint. The second one on the other hand, I have no idea what’s going on there. Hahah
(1st was the JS one, other was skiwi's)
 
@sᴉɔuɐɹɥԀ None that I can think of. The idea behind defining scrap: 0 is that if it would be omitted, you would be left wondering what the scrap value for the card was, or you would think that someone might have forgotten to declare it.
 
8:51 PM
OK
Does this look over-engineered to you @Simon?
value = entities[entityIndex].noAttack;
if (value === false || value === 0 || value === undefined) {
    var isEnchantment = entities[entityIndex].enchantment;
    if (isEnchantment === undefined || isEnchantment == false || isEnchantment === 0) {
        ECSResourceMap.createFor(entity).set(Resources.ATTACK_AVAILABLE, 0);
    } else {
        ECSResourceMap.createFor(entity).set(Resources.ATTACK_AVAILABLE, 1);
    }
} else if (value === true || value === 1) {
    ECSResourceMap.createFor(entity).set(Resources.ATTACK_AVAILABLE, 0);
 
@sᴉɔuɐɹɥԀ depends on your definition of "over-engineered"
value === false || value === 0 || value === undefined is ugly though. There is a typical JS-trick that can be done there. Not entirely sure, but I think I would do if (!value)
 
Ahh ok
 
9:09 PM
This look better?
Errr, my logic is wrong there
    value = entities[entityIndex].noAttack;
    if (entities.[entityIndex].enchanment || value) {
        ECSResourceMap.createFor(entity).set(Resources.ATTACK_AVAILABLE, 0);
    } else {
        ECSResourceMap.createFor(entity).set(Resources.ATTACK_AVAILABLE, 1);
    }
There, better
 
s/entities.[entityIndex]/entities[entityIndex]/
 
Oh, good catch
 
ummm... attackAvailable for enchantment...? You don't need to set that for enchantments...
 
Oh, that's already built-in?
 
enchantments cannot attack. Period.
Or is this intended for "Give rush" enchantments?
 
9:17 PM
No, it was intended for if "noAttack: false" was accidentally set for an enchantment card
Too much of an edge case perhaps?
 
yes.
it might be better to have some validation that enchantment cards does not have that value set
 
OK, that simplifies things then
 
as having the value would cause no difference, whatever the value is.
 
    value = entities[entityIndex].noAttack;
    if (!value) {
        ECSResourceMap.createFor(entity).set(Resources.ATTACK_AVAILABLE, 1);
    } else {
        ECSResourceMap.createFor(entity).set(Resources.ATTACK_AVAILABLE, 0);
    }
I think this will work best then
 
yes
and with that logic, you can even do this:
 
9:26 PM
Is SICKNESS an int or boolean on the Java end? i.e., if I set SICKNESS = 3 will I have to wait 3 turns?
 
ECSResourceMap.createFor(entity).set(Resources.ATTACK_AVAILABLE, !value ? 1 : 0);
 
^^ I find that a bit obfuscating, personally
 
@sᴉɔuɐɹɥԀ int. At least it is meant to work as an int. So I think that yes, SICKNESS = 3 ---> wait 3 turns
 
(from a JS beginner standpoint)
 
9:27 PM
If it does exactly the same thing, anyways, I prefer the longer version :)
 
\[[**Cardshifter/Cardshifter**](https://github.com/Cardshifter/Cardshifter)\] [**Phrancis**](https://github.com/Phrancis) pushed commit [**2dfe182c**](https://github.com/Cardshifter/Cardshifter/commit/2dfe182cefba84fc606efc279bc77ae3280fd6a9) to [**js-card-data-loader**](https://github.com/Cardshifter/Cardshifter/tree/js-card-data-loader): Update CardDataLoader.js

Expanded card loader concept code to map most types of values
> CardDataLoader.js concept code has been created. The team has yet to decide how to load the cards, so this will not be implemented until that decision is made.
> Data entry task. Go through the phrancis-cards.cards and convert all the data to JSON format.
 
@Duga And we all know how much @sᴉɔuɐɹɥԀ loves data entry, don't we!?
Mar 11 at 16:12, by Phrancis
@SimonAndréForsberg No more data entry for me, ever!
 
@SimonAndréForsberg Well, at least this time it's for a good cause ;)
I'll see if maybe Nick can help with that
 
@sᴉɔuɐɹɥԀ When you make changes to CardDataLoader.js or the CardData.js, feel free to make changes directly to the js-branch, or use your own branch and I will merge that into the js branch later. No need to create so many pull requests at this point :)
 
9:43 PM
Ah OK. lol
 
[Cardshifter/Cardshifter] Phrancis pushed 8 commits to js
\[[**Cardshifter/Cardshifter**](https://github.com/Cardshifter/Cardshifter)\] [**Phrancis**](https://github.com/Phrancis) pushed commit [**74bcadbd**](https://github.com/Cardshifter/Cardshifter/commit/74bcadbdd77e25031afb701ebd962e0ccc6cc34a) to [**js**](https://github.com/Cardshifter/Cardshifter/tree/js): Merge pull request #196 from Cardshifter/js-card-data-loader

Merge js-card-data-loader into js branch
 
Guess nobody else is working in the js branch so I might as well just own it eh ;)
 
[Cardshifter/Cardshifter] build #837 for commit e5cdabd0 from pull request #196 to branch js errored
@Phrancis, your build reported bad status: Errored!
 
@Duga false alarm!
 
Let's just say, theoretically, that we would use the JS card loading logic, since it is basically using what seems to be the exact same type of logic that is used in PhrancisGame.java (AFAICT), would it be a huge task to just make it work?
Keeping this in mind:
2 hours ago, by skiwi
Sure the loader can do some things, but you'd need to heavily modify it
 
9:48 PM
 
@sᴉɔuɐɹɥԀ parts of it can be made to work very quite easily, others is a bit more complicated (the effects)
 
Well, just leaving out the effects for the time being
I still need to think out how that would work
Might need to start with pen & paper, the logic/structure doesn't immediately jump at me
 
okay
feel free to suggest changes to it as well
 
Do you think the concept code you wrote for the game configuration would be tricky to "make work"/implement?
 
[Cardshifter/Cardshifter] build #838 for commit 74bcadbd on branch js passed
 
9:59 PM
@sᴉɔuɐɹɥԀ concept code? What concept code? for the effects you mean? Not necessarily.
Now you also gave me an idea how to possibly make the rest of the PhrancisGame configuration (hopefully) easier for modders! (the systems and stuff)
 
@sᴉɔuɐɹɥԀ technically, that is already working.
I can't remember why I didn't finish converting PhrancisGame to JS.
 
Actually, do you really think all the background config stuff should be moved to JS?
(at least, that looks like BG config stuff to me, I may be wrong)
 
@sᴉɔuɐɹɥԀ what background config stuff?
 
Maybe I'm thinking about it wrong...
 
10:03 PM
Please, elaborate. What do you mean?
 
I guess declaring and setting up zones and players is not really BG config
 
ah, that. I don't know what to call it, but eventually I think that should also be moved to JS, yes.
 
OK. Well, TTGH. Thanks for the help, it feels like the project is moving again, and I finally get to contribute directly to the game itself, which is a great feeling :D
 
I do have a bit of stuff to do these days, but I might work on implementing the loader aspects of it some day(s).
 
10:27 PM
here is some fun code from today:
private void processPlayerBoughtAbilityMessage(PlayerBoughtAbilityMessage message) {
    System.out.println("processing ability purchase");

    Player player = message.client.getPlayer();
    AbilityType abilityType = message.getAbilityType();

    if (player.hasResourcesForAbility(abilityType, player.getResourceTotals())) {
        if (!player.getUnlockedAbilities().contains(abilityType)) {
            player.addAbility(abilityType);
            for (ResourceType resourceType : abilityType.getResourceCostForAbility().keySet()) {
 
Fun! Fun! Fun!
 
That doesn't look too bad; or does it?
 
@sᴉɔuɐɹɥԀ Speaking of the SICKNESS = 3 thing, the delay for ranged units which makes them not be able to attack next turn is actually implemented by giving them a sickness value of 2 after they attack.
 
Ohhhh nice!
So the SICKNESS value just gets decremented by 1 across all cards for each passing turn, and when it is 0 then the card is allowed to attack?
 
@sᴉɔuɐɹɥԀ yup
 
10:34 PM
Sweet, so this could very easily make for some paralyze/freeze spells/effects!
 
Is a lot of the game logic made just manipulating the ECSResourceMap like that?
(e.g., adding health/attack, causing damage, all that)
 
Makes sense. We should spend a bit of time to write out all the different things that happen to ECSResourceMap as the game goes on (in plain English), I think this would be important for effective modding
 
@sᴉɔuɐɹɥԀ its just pretty complicated and doing lots of things at once
but, it works!
2
 
10:39 PM
Very nice!!
@SimonAndréForsberg Could you point me to the most important files I would want to look at if I were to try and map out what happens to the resource map(s) from turn to turn?
 
@sᴉɔuɐɹɥԀ The idea is that everything should be possible to overview from PhrancisGame.java
some of the different systems are the ones that make changes to the resource maps
TTGTB
 
Good night Simon :D
 
11:06 PM
I think I have an idea on how to map out effect stuff... using JSON! I'll write some pseudo-code to show you tomorrow @Simon
 
11:22 PM
var effectElements = {
	triggers: {
		onEndTurn: {},
		onStartTurn: {},
		onStartGame: {},

		onSelfPlayerDamage: {},
		onOpponentPlayerDamage: {},
		onAnyPlayerDamage: {},

		onSelfCardDamage: {},
		onSelfCardDeath: {},
		onOpponentCardDamage: {},
		onOpponentCardDeath: {},
		onSelfSpecificCardDeath: {},
		onOpponentSpecificCardDeath: {}
	},
	actions: {
		damage: {},
		heal: {},
		drawCard: {},
		burnCard: {},

		addAttack: {},
		addHealth: {},

		giveRush: {},
		giveRanged: {},
		giveTaunt: {},
Call me crazy, if you wish... but I think something structured like this could work... Granted that within each sub-object is the code to make that element work, if we can think of a way to chain them, e.g., calling another scan of the JSON tree if there is another reference after each effect element is called
 
11:45 PM
200_success vs. rolfl: 169 diff. Year: -536. Quarter: -379. Month: -379. Week: -185. Day: +127.
Loki Astari vs. Simon André Forsberg: 4084 diff. Year: -1682. Quarter: -383. Month: -383. Week: -80. Day: -30.
\[[**Cardshifter/Cardshifter**](https://github.com/Cardshifter/Cardshifter)\] [**Phrancis**](https://github.com/Phrancis) pushed commit [**eeee5db6**](https://github.com/Cardshifter/Cardshifter/commit/eeee5db66bb32ae709bb34c52320163430a130d8) to [**js**](https://github.com/Cardshifter/Cardshifter/tree/js): Create EffectElements

Tentative stub code for effects
 

« first day (271 days earlier)      last day (3295 days later) »