Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rewards and penalties to random events #99

Merged
merged 7 commits into from
Sep 8, 2022
Merged

Conversation

rizfn
Copy link
Contributor

@rizfn rizfn commented Sep 2, 2022

Solves #95 .

As of now, I've only done a bit of mapping on the data, and not touched the frontend stuff.

  • Skills and bacterias are not mapped yet
  • Troops not mapped yet, not sure if it's necessary because it doesn't seem to be done for requirements?
  • Not sure what some attributes do: reward.troop and reward.storyObjective. The latter may be campaign related?
  • Two quantities (namely, reward.artifactReward and penalty.destroyOwnedBuilding.buildingToDestroy have default values of 0 when the event is not related to them. A direct mapping like artifactTypes[reward.artifactReward] would end up removing the artifact reward attribute, as it lacks a key of 0. If we're fine with dropping irrelevant attributes that should be fine, but for now I've used reward.artifactReward ? artifactTypes[reward.artifactReward] : reward.artifactReward (if non-zero, map, otherwise return 0)

@vercel
Copy link

vercel bot commented Sep 2, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
soc-gg ✅ Ready (Inspect) Visit Preview Sep 8, 2022 at 8:46AM (UTC)

Throws a "Can not find bacteria undefined" error, and returns null
@lgtm-com
Copy link

lgtm-com bot commented Sep 2, 2022

This pull request introduces 2 alerts when merging cc77189 into a5f03d6 - view on LGTM.com

new alerts:

  • 2 for Superfluous trailing arguments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants