Code Monkey home page Code Monkey logo

simspellstone's People

Contributors

dependabot[bot] avatar jimnvox avatar maxgroenenboom avatar thesench avatar vuzaldo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

simspellstone's Issues

Points bug

In simulator_base.js,

healthStats.player.percent = stats.taken / stats.total;
healthStats.cpu.percent = stats.taken / stats.total;

needs changing to

healthStats.player.percent = healthStats.player.taken / healthStats.player.total;
healthStats.cpu.percent = healthStats.cpu.taken / healthStats.cpu.total;

This almost works. However, it can give rise to points scores in excess of 200, suggesting that stats.taken can go negative, i.e. that remaining health can be larger than full health, somehow. Is invigorate not quite working properly, perhaps?

Dungeons can't go over level 100

I assume this has to do with the way the data gets pulled in during the auto-updates, it seems that the 'upgrade_levels' property of all the dungeons gets set to 100, which looks to be coming directly from the api.php data (?) 'dungeon_upgrade_levels' which is set at 100 for some reason on synapticon's end.

Not positive that this is what triggers the error when trying to setup against a dungeon past level 100, but without exploring deeper I'm guessing that's the cause for the following error when a level past 100 is input:

simulator.js:2413 Uncaught TypeError: Cannot read property 'maxLevel' of undefined
at getPresetUnit (simulator.js:2413)
at load_preset_deck (simulator.js:2288)
at load_deck_raid (simulator.js:2263)
at HTMLInputElement. (simulator.js:6949)
at HTMLInputElement.dispatch (vendor.js:3)
at HTMLInputElement.r.handle (vendor.js:3)

terragon peak map bge bolt issue

to replicate sim terragon peak with bolt all map bge given a value (1 will do) on any node/mission (used node 3, mission 2).

error encountered:

`

JavaScript error:
Uncaught TypeError: unit.isActive is not a function
on line 262
for https://thesench.github.io/SIMSpellstone/scripts/simulator_base.js
Browser CodeName: Mozilla
Browser Name: Netscape
Browser Version: 5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36
Cookies Enabled: true
Platform: Linux x86_64
User-agent header: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36
SimSpellstone version: v2.0
Deck hash: gn5AAwEgrCAqrhCIduCCg0VrCIWQnCIWQnCgVZBFAZ0rBodeBFo8arCo8arCIHUrCw6FlCYsQrCo5fpC
Ordered: Yes
Mission ID: 6111
Battleground ID: 105,120

`

Adaptive Weaponry Not Implemented Properly

The devs decided to do something different and have the faction BGE effects apply to the new Void Champ even though it does not belong to those factions.

Originally they tried to do achieve this by adding a new "card" XML attribute but this didn't work so they rolled it back, so the sim was accurate.

They were able to fix it now and the buff is active in game. Instead of using a new attribute, they're just applying all the effects to the void mecha type.

<add_skill id="legion" x="5" yy="0,16" delay="2"/>

<add_skill id="barrage" x="6" yy="0,16" delay="2"/>

<add_skill id="venom" x="5" yy="0,16" delay="2"/>

It isn't working in the sim. I'm assuming this is because you aren't handling the void (0) faction.

Wing Guard Still not implementing

For the online and downloaded versions of the sim, the latest update (5/7/2019) appears to have corrected the issue with invigorate and radiance. However, still getting the message in debug mode:
"Verus, the Galeheart*{7/7} (3) [7/29/0] attempts to use Wing Guard, but it is not implemented."

Heal/Regenerate not properly implemented

Currently the sim only removes cards at the end of the turns.

This allows cards which have died to be healed back to life.

Sim should either remove these cards before the end of the turn or not allow them to be healed/regenerated once health drops to 0 or lower.

warded is not defined

Getting this error:

JavaScript error: ReferenceError: warded is not defined on line 2495 for https://thesench.github.io/SIMSpellstone/scripts/simulator_base.js Browser CodeName: Mozilla Browser Name: Netscape Browser Version: 5.0 (Macintosh) Cookies Enabled: true Platform: MacIntel User-agent header: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:59.0) Gecko/20100101 Firefox/59.0 SimSpellstone version: v2.0 Deck hash: QXvAAQmvgCYSt2IoVQ6II8gAFoXsqBQPYCCw5aSBw5aSBAkmnCYWPnHIdO4IYPwiHAHsiCAHsiCQlzCC Ordered: Yes Exact-order: Yes Enemy deck hash: IuhUAIn4gH4ZpiHYwarBoTxgCwcfhCQxPiHgAxhHYHsBKYHsBKYHsBKQ~mBKQ~mBKQ~mBKQ~mBK Battleground ID: 120,121

Need link to create Bug Report

The simulator should link out to a page here for creating bugs. This will require:

  1. Adding a link in the HTML
  2. Adding an issue template to make it easy to create a proper bug report

Raid points vs "invigorate" skill

At #30, it was mentioned that after the "fix" there was a small problem that raid points could somehow end up being >200.

The problem seems to be that invigorate updates the unit's max health only in the field, not also in the deck. I have not confirmed this with a fix to the code, though I can confirm that the problem has thus far only occurred when Atlas is in my deck.

Enemy Enhance Berserk skills enhancing my cards too

Hi

My berserk cards somehow receive skills from enemy. You can easily replicate same issue. Here is my settings and logs. Simulator said 47% winning change but after losing 5. match and spending 75 energy, i found this :) Thanks for your awesome work.

Attacker:
Deck Hash: AIOBAw8YSBfNZSB4D3jCwQhlCI!ilCbysCC4YmlCo2nlCQGolCIpwlCIZq1INiv1IYtY4IIQVTBIbZDC
Defender:
Campaign: Dawnglow Swamp
Mission: Corrupter's Wrath
Level: 7

Talonsaur Log:
Turn 1 begins for Aria the Nightwielder{6/6} [50 HP]
Aria the Nightwielder{6/6} [50 HP] plays Talonsaur{5/5} (0) [6/23/3]

Turn 7 begins for Aria the Nightwielder{6/6} [50 HP]
(Attack: +6 Enfeeble: +3 Barrier: -4) = 5 damage
Talonsaur{5/5} (0) [6/23/0] attacks Grizzly Despair{5/5} (0) [4/16/1] for 5 damage
Talonsaur{5/5} (0) [7/23/0] activates berserk and gains 1 attack

Turn 9 begins for Aria the Nightwielder{6/6} [50 HP]
Aria the Nightwielder{6/6} [50 HP] imbues Talonsaur{5/5} (0) [7/20/0] with berserk 1
Lilypad Leaper{4/5} (1) [4/12/0] empowers Talonsaur{5/5} (0) [11/20/0] by 4
Soul of Elaria{5/5} (2) [5/20/0] empowers Talonsaur{5/5} (0) [16/20/0] by 5
(Attack: +6 Berserk: +1 Rally: +9 Barrier: -4) = 12 damage
Talonsaur{5/5} (0) [16/23/0] attacks Grizzly Despair{5/5} (0) [6/3/0] for 12 damage
Talonsaur{5/5} (0) [22/23/0] activates berserk and gains 6 attack

Brine Bellower Log:
Turn 1 begins for Aria the Nightwielder{6/6} [50 HP]
Aria the Nightwielder{6/6} [50 HP] plays Brine Bellower*{5/5} (0) [5/19/3]

Turn 7 begins for Aria the Nightwielder{6/6} [50 HP]
(Attack: +5 Enfeeble: +3 Barrier: -4) = 4 damage
Brine Bellower*{5/5} (0) [5/15/0] attacks Captain Firebeard{6/6} (0) [7/16/0] for 4 damage
Brine Bellower*{5/5} (0) [11/15/0] activates berserk and gains 6 attack

Turn 9 begins for Aria the Nightwielder{6/6} [50 HP]
Aria the Nightwielder{6/6} [50 HP] imbues Brine Bellower*{5/5} (0) [11/19/0] with berserk 1
Symbol of Elaria{5/5} (1) [4/18/0] empowers Brine Bellower*{5/5} (0) [15/19/0] by 4
Lilypad Leaper*{5/5} (2) [2/12/0] empowers Brine Bellower*{5/5} (0) [21/19/0] by 6
(Attack: +5 Berserk: +6 Rally: +10 Barrier: -4) = 17 damage
Brine Bellower*{5/5} (0) [21/19/0] attacks Captain Firebeard{6/6} (0) [7/0/0] for 17 damage and it dies
Brine Bellower*{5/5} (0) [24/19/0] activates berserk and gains 3 attack

Wingward not implemented properly

Currently wingward gives virus invisible 6. It should only give invisible 3.

Additionally, if there is no left most card, verus does not give wingward to another card. In this scenario, the card to the right of verus should receive wingward.

More Silence Issues

Found a few more issues with silence.

Currently in the sim silence is applied to the hero when direct damage is dealt. The hero cannot be silenced. In run mode it seems possible that the silence is being applied to the hero by Kalyt simply being in the deck.

Currently in the sim shroud is not removed by silence in the sim. It should be removed.

The current frog BGE lily & spear formation is not removed by silence in the sim. It should also be removed. We are still double checking other BGE effects, but it appears it can remove imbued skills if those skills can normally be silenced.

vampirism is not healing?

See the below debug log excerpt (relevant lines bolded) for example, as cauterizing fist drains 6 health, but doesn't seem to add to it's own hp:

Centurion Spikesteel{6/6} (0) [12/27/0] attacks Cauterizing Fist{5/5} (0) [8/14/0] for 12 damage
Hoggernaut MK III{6/6} (1) [15/48/2] is not active yet
Life Vessel{6/6} (2) [20/46/2] is not active yet
(Vampirism: +5 Ward: -9) = 0 damage
Twistwood{6/6} (3) [16/40/3] activates vampirism, draining 0 health from Absorbing Sleetbones{5/5} (3) [10/48/4]
Twistwood{6/6} (3) [16/40/3] is not active yet
Centurion Spikesteel{6/6} (0) [10/15/0] takes 12 scorch damage
Turn 8 ends

Turn 9 begins for Orgoth the Hex Fist{6/6} [53 HP]
Orgoth the Hex Fist{6/6} [53 HP] draws Colossal Sundermarr{6/6}
Nether Blackfin{6/6} (2) [11/48/2] reduces its timer
Absorbing Sleetbones{5/5} (3) [10/48/3] reduces its timer
Orgoth the Hex Fist{6/6} [53 HP] plays Jewel Harvester{6/6} (4) [5/28/2]
Orgoth the Hex Fist{6/6} [53 HP] hexes Centurion Spikesteel{6/6} (0) [10/15/0] by 1
Orgoth the Hex Fist{6/6} [53 HP] hexes Hoggernaut MK III{6/6} (1) [10/48/2] by 1
Orgoth the Hex Fist{6/6} [53 HP] hexes Life Vessel{6/6} (2) [15/46/2] by 1
Orgoth the Hex Fist{6/6} [53 HP] hexes Twistwood{6/6} (3) [11/40/3] by 1
Orgoth the Hex Fist{6/6} [53 HP] weakens Centurion Spikesteel{6/6} (0) [7/15/0] by 3
(Vampirism: +5 Enfeeble: +1) = 6 damage
Cauterizing Fist{5/5} (0) [8/14/0] activates vampirism, draining 6 health from Centurion Spikesteel{6/6} (0) [7/9/0]
Cauterizing Fist{5/5} (0) [8/14/0] inflicts scorch(6) on Centurion Spikesteel{6/6} (0) [7/9/0]
(Attack: +8 Enfeeble: +1) = 9 damage
Cauterizing Fist{5/5} (0) [8/14/0] attacks Centurion Spikesteel{6/6} (0) [7/0/0] for 9 damage and it dies
(Vengance: +9 Ward: -5) = 4 damage
Cauterizing Fist{5/5} (0) [8/10/0] takes 4 vengance damage
(Strike: +3 Enfeeble: +1 Stasis: -6) = 0 damage

Vali, the Vanquisher{6/6} (1) [9/26/0] bolts Hoggernaut MK III{6/6} (1) [10/48/2] for 0 damage
(Strike: +3 Enfeeble: +1 Stasis: -8) = 0 damage
Vali, the Vanquisher{6/6} (1) [9/26/0] bolts Life Vessel{6/6} (2) [15/46/2] for 0 damage
(Strike: +3 Enfeeble: +1 Stasis: -6) = 0 damage
Vali, the Vanquisher{6/6} (1) [9/26/0] bolts Twistwood{6/6} (3) [11/40/3] for 0 damage
(Frostbreath: +2 Enfeeble: +1 Stasis: -6) = 0 damage
Vali, the Vanquisher{6/6} (1) [9/26/0] breathes frost at Hoggernaut MK III{6/6} (1) [10/48/2] for 0 damage
(Frostbreath: +2 Enfeeble: +1 Stasis: -8) = 0 damage
Vali, the Vanquisher{6/6} (1) [9/26/0] breathes frost at Life Vessel{6/6} (2) [15/46/2] for 0 damage
(Attack: +9 Enfeeble: +1 Shroud: -6) = 4 damage
Vali, the Vanquisher{6/6} (1) [9/26/0] attacks Hoggernaut MK III{6/6} (1) [10/44/2] for 4 damage
(Vampirism: +6 Enfeeble: +1 Stasis: -8) = 0 damage
Nether Blackfin{6/6} (2) [11/48/2] activates vampirism, draining 0 health from Life Vessel{6/6} (2) [15/46/2]
Nether Blackfin{6/6} (2) [11/48/2] is not active yet
(Vampirism: +6 Enfeeble: +1 Stasis: -6) = 0 damage
Absorbing Sleetbones{5/5} (3) [10/48/3] activates vampirism, draining 0 health from Twistwood{6/6} (3) [11/40/3]
Absorbing Sleetbones{5/5} (3) [10/48/3] is not active yet
Jewel Harvester{6/6} (4) [5/28/2] is not active yet
Cauterizing Fist{5/5} (0) [8/16/0] regenerates 6 health
Centurion Spikesteel{6/6} (0) [7/0/0] is removed from field
Turn 9 ends

Need more Integration Tests

I need more integration tests to verify functionality after changes are made. They can be found here:
/cypress/integration.

The easiest place to start is in the Deck Tests group. The format for a deck test is simply adding a testDeck function call and it will set up the test. The parameters are as follows:

  • description
  • deck1 hash
  • deck2 hash
  • expected winrate (+/-5)
  • BGEs hash (copy from URL after checking the BGEs you want, defaults to NONE)

Deck Builder hangs with Viracocha

The new champion Viracocha doesn't have a faction, but rather than being 'Factionless' it looks like he's straight up missing the attribute in his XML.

This causes a halting error on line273 of cards_gui.js when it tries to add the faction name to the class list.

convertCardsXML no longer works

Error#1: if(imageRemappings.TryGetValue(unit.id, out string remappedPortrait))

Invalid expression term 'string'

; expected

Invalid expression term ')'

and

Error #2: suffixMap.TryGetValue(suffix, out int fusion);

"devour" is broken

When "devour" increases health beyond the max, it should increase the max health as well.

I think this accounts for the raid scores in excess of 200 mentioned at #30 .

Added: I'm really not sure about this one -- needs some in-game research.

simulator broken

Received the following message when running a simulation:

`

JavaScript error:
Uncaught ReferenceError: target is not defined
on line 3031
for http://thesench.github.io/SIMSpellstone/scripts/simulator_base.js
Browser CodeName: Mozilla
Browser Name: Netscape
Browser Version: 5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
Cookies Enabled: true
Platform: Linux x86_64
User-agent header: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
SimSpellstone version: v2.0
Deck hash: gn5AAA4vmCgpQSBAicuHQOwqCom~qCIcGrCge6qCozplCQkLrCI9JBF4UPBFQTcAFYborBgjtrBAerTB
Mission ID: 5886
Battleground ID: 114,128

`

Silence not implemented properly

There are a few cases where silence is not implemented properly.

Currently in the sim, silence removes corrosive, emberhide, and vengeance. These skills should not be removed by silence.

Regenerate and Reanimate are not removed by silence in the sim. These skills should be removed by silence.

Duplicate BGE names

The bug

The list of displayed names in the "Battleground Effects" panel contains duplicates: two instances of "Elemental Surge" (ids 107 and 116) and two instances of "The Arena" (ids 514 and 521).

In each case, the skill definitions are different. For example, in The Arena:

  • The Arena (id 514) has slow=1
  • The Arena (id 521) has slow=2 <-- this is the one used in the actual Arena

This is confusing. At a minimum, the names should be different.

Possible solutions

Please consider making the sim detect the duplicate name and tag the displayed entry with the id, or doing something else to differentiate the namesake effects. Tool-tips differentiate the two BGEs named "The Arena", but they don't differentiate the two BGEs named "Elemental Surge".

It would also be helpful to sort the BGE names alphabetically. For one, this would make it easier to search the list; but, perhaps more importantly, it would also make it obvious when a BGE name was a duplicate (and thus that the user should pay close attention to the tool-tip or other differentiating information).

Enhance multiplier issue when followed by imbue

This can be tested with the Berserker Rage BGE (from Battlefield challenge) when using Aria as hero (Imbue All Berserk 3).

In the sim it first sets the enhancement value to -0.5 (negative is marking as a multiplier) but then with Aria imbue it will be changed to 2.5 instead, so any berserk card will have a fixed +2.5 boost (no 50% enhancement).

The same issue arises with the Firestarter BGE (Inferno challenge) when using Scyer as hero (Imbue All Scorch 3), enhancing every card with scorch by 2.5.

I think this could be fixed by either resolving the multiplier to stack the fixed value, or storing separate types of enhancement.

Game changes

Hi TheSench,

saneiac here. We met briefly during the miserable failure of a merge between the Phoenix guilds and the R3 guilds, just before your retirement. I remember you being one of the few people from either side that remained friendly and positive while everything was falling apart. You have my respect for that!

ComDev has made some changes to the game that affect the Deck Builder.

The Legacy Set, set 1100, is empty and has been, um, Legacied. The hourglass symbol previously used for the Legacy set has been repurposed for Premium Champions, set 5100.
The Bear tribe, unit sub_type 14, which for years contained only one or two cards, has been changed to the Beast tribe and populated. We are currently using a Frostbite Raid icon for the beast tribe, found in asset bundle 26,

Thanks for keeping the sim up and running for so long!

Age of Dragons BGE is broken

Since heal was updated, Age of Dragons BGE doesn't work anymore (BGE is still used for challenges).

Should have x value of 1.25 instead of mult of .25.

Currently broken

<blockquote>JavaScript error:
 Uncaught ReferenceError: angular is not defined
 on line 190
 for http://thesench.github.io/SIMSpellstone/scripts/gui_script.js
Browser CodeName: Mozilla
Browser Name: Netscape
Browser Version: 5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36
Cookies Enabled: true
Platform: Win32
User-agent header: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36
SimSpellstone version: v2.0
</blockquote>

Probably because of Battle.html Line 11 where closing quotes " are missing?

<script src="lib/jquery-ui-1.11.4.custom/jquery-ui.min.js></script>

Rarity tweak does the opposite of what's intended

The recent change in getCardRanking from rarity + 5 + level to rarity + 4 + level is the opposite of that requested in my PR: the changed code should be rarity + 6 + level instead.

The if case in getCardRanking deals with non-champion cards. If I'm reading it correctly, it gives standard legendaries a score of 30 points:

var rarity = parseInt(card.rarity) * 6;                          // 24
var fusion = (cardID.length > 4 ? parseInt(cardID[0]) : 0) * 3;  // 6
var level = parseInt(card.level) - parseInt(card.maxLevel);      // 0
return rarity + fusion + level;                                  // 30

The then case deals with champions. Again hoping that I'm reading it correctly, before the change it gave level 4 champions a score of 29 points: rarity*5 + 5 + level = 20 + 5 + 4 = 29.

var rarity = parseInt(card.rarity) * 5;  // 20
var level = card.level;                  // 4
return rarity + 5 + level;               // 29

In-game trials (in the "Guild Hall") show that standard legendaries and L4 champions are given equal precedence by the AI, while L5 champions rank higher. So we need L4 champions to score 30, not 29, and the code should compute rarity + 6 + level accordingly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.