Comments (5)
from ancientbeast.
Hey there! This project looks great. I wanted to start contributing to open source projects & this issue seems like a good place to start. Can I contribute to fixing this?
from ancientbeast.
AncientBeast/src/abilities/Impaler.js
Line 211 in ba65fa3
The problem is (most likely) above.
There was a previous bug that caused multiple "hits" from Poisonous Vine
. I worked on that, but didn't remove the extra messages.
Good luck!
from ancientbeast.
So I got to fixing it but its a bigger issue overall that I noticed with Traps (I may be wrong so please do correct me). After debugging for a bit I found the issue to be in the onStepOut function of the game.
Currently we're applying traps to all the hexes but we want them to be a single trap & not be called multiple times, so the broader solution to this is to maybe make traps occupy different number of hexes but being one entity. This will make it so that all trap related functions etc. will be executed once as intended but the trap will just take on as much space as the creature it was applied on.
For now I've made changes to the triggerTrap function & updated it to the Trap class since it was using a depreciated call as well as made it so the trap activates once but destroys all instances of the trap the creature is currently on. This fix should work temporarily but I feel the above change to traps is something to resolve the issue completely. If that's the case I would be happy to take it on once the issue is created for it :D
I'll be making a PR in just a bit so y'all can check it out
from ancientbeast.
Feel free to open a discussion or a PR with a refactor for the broader issue.
Everything that touches abilities could probably use a refactor as the whole system is rather difficult for contributors to work with, update and debug. I'm currently working on HexGrid which executes the abilities, with an eye towards moving on to an Ability refactor eventually.
Personally, I'd especially welcome code examples from other projects. In particular, for abilities, Wesnoth has somewhat similar needs to AB, but their approach to specifying abilities (and everything else) is completely different. And given how successful they've been at attracting contributors, there's probably something we could learn.
from ancientbeast.
Related Issues (20)
- coinimp.js? miner.html? HOT 4
- Husky lint-staged not running [bounty: 10 XTR] HOT 4
- Node.js server fails to start HOT 1
- missing ability trap sprites [bounty: 2 XTR] HOT 1
- drops not centered [bounty: 1 XTR] HOT 1
- OpenCollective widget within dash [bounty: 3 XTR] HOT 3
- star-history.com advertising HOT 1
- Abolished Fiery Touch throws error when used facing left HOT 1
- bouncing indicator [bounty: 2 XTR] HOT 11
- Hint `cssClass`
- Hex hover bug - Hexgrid + hotkeys HOT 1
- Pathfinding doesn't use h(n) HOT 1
- `creature.adjacentHexes` returns counter-clockwise hexes when `clockwise=true`
- Creature Dash arrow keys error: "stats is undefined" HOT 11
- Creature Dash: arrow keys don't move the "active" grid element HOT 3
- can't enable ability upgrades from the start [bounty: 3 XTR] HOT 2
- vertical browser tabs overlap UI elements [bounty: 6 XTR] HOT 5
- Firefox warns about OpenCollective embed HOT 2
- `creature.flipped` is `undefined` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ancientbeast.