Giter Club home page Giter Club logo

Comments (5)

DreadKnight avatar DreadKnight commented on July 19, 2024 1

from ancientbeast.

JoelFernandes09 avatar JoelFernandes09 commented on July 19, 2024

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.

andretchen0 avatar andretchen0 commented on July 19, 2024

@JoelFernandes09

G.log('%CreatureName' + target.id + '% is injured by ' + effect.name);

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.

JoelFernandes09 avatar JoelFernandes09 commented on July 19, 2024

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.

andretchen0 avatar andretchen0 commented on July 19, 2024

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)

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.