Giter Club home page Giter Club logo

overclaimshield's Introduction

Adds a /t toggle overclaimshield command that when ran will add a boolean metadata field to the town representing their overclaim shield status. Command permission is overclaimshield.command.toggle.overclaimshield

When this command is run, the shield will be enabled or disabled depending on the previous state, if it is enabled there will be a confirmation explaining the cost that will be incurred for toggling it on and the subsequent costs at new days.

On each Towny new day all towns will be iterated over, if they have overclaim shield enabled, have chunks over the limit, and have the sufficient funds their town will be charged. If they do not have sufficient funds they will not be charged and their overclaim shield status will be removed.

Additionally, when the overclaim shield command is initially ran there will be a metadata field added to the town representing the current time, if the next new day is less than 24 hours after the initial toggling on of the shield there will be no extra charge for that day.

The cost to enable and maintain the overclaim shield each day is determined by two config settings, a cost and a grouping size. Any chunks over the limit will be divided by this grouping size and the resulting number of groups will be multiplied by the cost.

price = (l/g) * c where l is the number of townblocks over the limit, g is the grouping size and c is the cost per group.

overclaimshield's People

Contributors

jwkerr avatar

Stargazers

 avatar keijo avatar CorruptedGreed avatar

Watchers

 avatar

Forkers

corruptedgreed

overclaimshield's Issues

Add a daily overclaim limit for towns

Add "o_claimcount" to town metadata and set to maximum amount of claims (ex: o_claimcount = 8 for 8 chunks). Remove 1 for everytime a town runs takeoverclaim. Once o_claimcount = 0, prevent town from takeoverclaim. On new day, reset back to default value.

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.