Giter Club home page Giter Club logo

superalphapet's People

Contributors

hayden-matheus avatar hsong7273 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

johnr425

superalphapet's Issues

Selling Duck causes TypeError

pl = Player(team=['duck']) pl.sell(0)

Raises TypeError

It is unclear if an issue with duck effect or with effects that affect shop. May hint at future issues with Expansion Pack pets

TypeError                                 Traceback (most recent call last)
c:\Users\Hasung\Dropbox\SuperAlphaPet\sapai.ipynb Cell 3 in <cell line: 2>()
      [1](vscode-notebook-cell:/c%3A/Users/Hasung/Dropbox/SuperAlphaPet/sapai.ipynb#ch0000014?line=0) pl = Player(team=['duck'])
----> [2](vscode-notebook-cell:/c%3A/Users/Hasung/Dropbox/SuperAlphaPet/sapai.ipynb#ch0000014?line=1) pl.sell(0)

File c:\Users\Hasung\Dropbox\SuperAlphaPet\sapai\player.py:50, in storeaction.<locals>.store_action(*args, **kwargs)
     48 player = args[0]
     49 action_name = str(func.__name__).split(".")[-1]
---> 50 targets = func(*args,**kwargs)
     51 store_targets = []
     52 if targets != None:

File c:\Users\Hasung\Dropbox\SuperAlphaPet\sapai\player.py:682, in Player.sell(self, pet)
    680 ### Activate sell trigger first
    681 for slot in self.team:
--> 682     slot._pet.sell_trigger(pet)
    684 if self.team.check_friend(pet):
    685     self.team.remove(pet)

File c:\Users\Hasung\Dropbox\SuperAlphaPet\sapai\pets.py:267, in Pet.sell_trigger(self, trigger)
    264     if trigger == self:
    265         return activated,targets,possible
--> 267 targets,possible = func(self, [0,pet_idx], [self.team], trigger)
    269 activated = True 
    270 return activated,targets,possible

File c:\Users\Hasung\Dropbox\SuperAlphaPet\sapai\effects.py:655, in ModifyStats(apet, apet_idx, teams, te, te_idx, fixed_targets)
    653     target_pet._until_end_of_battle_health_buff += health_amount
    654 else:
--> 655     target_pet._attack += attack_amount
    656     target_pet._health += health_amount
    657 if "includingFuture" in apet.ability["effect"]["target"] and apet.ability["effect"]["target"]["includingFuture"] is True:

TypeError: can only concatenate str (not "int") to str```

Pet/Food/Status ID numbers and targeted food flag should be added to sapai.data

Currently Pet, Food, and Statuses are indexed in the player.init(). They should be added to the data dictionary.
This index is used for the team and player state vectors, it could be called petID, foodID, statusID

The targeted food boolean should also be added to sapai.data, simply add the "targeted" : true/false to each food item in the data dictionary

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.