GithubHelp home page GithubHelp logo

poooi / plugin-anchorage-repair Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 2.0 94 KB

Anchorage repair plugin for poi

License: MIT License

JavaScript 95.37% CSS 4.63%
poi poi-plugin kancolle kantai-collection

plugin-anchorage-repair's Introduction

Anchorage repair plugin for poi

npm package

简体中文说明

Description

A plugin to help in Akashi's anchorage repair arrangement, features:

  • estimate anchorage repair time
  • notify upon ship repair completes

Limitations

  • When you change the fleet composition, Kancolle API will not renew ships' HP, which may lead to inaccurate repair time estimation. You have to return to HQ screen to refresh ship data.

Basic mechanism

Docking repair time

The formula base on HP loss, level and ship type is already proved, while this value is also given in API's api_ndock_time.

Akashi's anchorage repair requirement

  • Akashi (or Kai) must be fleet flagship, with minor damage or less, and is not in docking.
  • Akashi can repair herslf and ship in 2nd lot, and plus one ship slot per Ship Repair Facility.
  • Ships get repaired at minor damage (HP > 50% max HP) or less.
  • ship is not in docking.

Repair time

  • it takes at least 20 minutes to repair ships by at least 1 HP
  • Above 20 minutes, the the amount will be the same as ships in docking, rounded down.
  • In the docking time formula, a 30-second bias is always added; the docking is actually finished, however, 1 minute earlier. And anchorage repair time will be rounded up to next minute.
  • The repair timer will reset by:
    • returning to the HQ screen after 20 minutes from the time the composition changed, that is, ships' hp changed,
    • changing fleet composition while dragging a ship out of fleet or disbanding the whole fleet won't,
    • docking fleet member with Bucket, normal docking won't reset,
    • sending the fleet to expedition.

Corner cases

Following corner cases are not taken into consideration, thus the result may not behave as it could be.

  • changing Akashi's slot itmes, more precisely, changing the numbers of Ship Repair Facilities,
  • sending fleet to sortie.

Experimental

Loading composition presets won't reset the timer, which is sometimes regarded as a bug.

Changelog

v0.1

Initial version

v0.2

Now the timer is always displayed for those who want to make use of composition preset bug.

v0.3

The timer reset rules corrected

  • Returning to HQ within 20 minutes won't reset the timer,
  • Changing fleet composition within 20 minutes will immediately reset the timer. Otherwise a return to HQ is required

References

License

MIT

plugin-anchorage-repair's People

Contributors

javran avatar kagamichan avatar kochiyaocean avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

sorayama javran

plugin-anchorage-repair's Issues

bugs to fix

  • 50% hp should be 中破, e.g. 18/36
  • better separate cases of improvement and akashi

計時器刷新時間判定

觀察航海日誌擴張版的計時器刷新判定,和此擴充程式相異處有二:

  1. 在旗艦非明石時艦隊換人、換位時只有在改動前旗艦非明石,而改動後為明石才會刷新計時器。(這邊是無論如何只要旗艦換人就刷新)
  2. 計時器是四個艦隊共用同樣一個計時器(這點在日 wiki 也有特別註明)(這邊目前是分開計時)。

就長期使用下來、航海日誌擴張版的判定方式是正確的,因此是否能撥冗修正呢?
會需要這兩項功能主要是想將(複數個)明石旗艦的修理船編好記錄後,接近修理時間再回母港展開待命,但目前貴擴充套件的判定方式會使得計時器的時間完全亂掉,只能搭配航海日誌一同使用(也是我目前唯一需要航海日誌的功能了…)

Known problems & TODOs

bugs:

improvements

  • Notify when 20min reached
  • add minutely consommation calc

  • indicate / exclude ships in dock
  • use heavily damage label style
  • shows countup in all cases
  • process composition loading API to cover composition bug

加一个建议刷新时间

计算泊地修理效率,增加一个"建议过多久之后回港刷新",供(甘地)玩家参考。

效率定义:用于修理的有效时间 / 总时间
例如:
某长门回复一点 HP 需要 25min,那么在 20min 时,由于游戏机制此时回港必定回复一点 HP,效率为 25 / 20 = 125%。而在 60min 时,回复 2hp,效率为 2 * 25 / 60 = 83%。

ps1:记得好像说修理是有延迟的。如果说理论上 25min 修复一点,那么 50min 时马上回港并不能修复 2hp,而要等到 50min + 10 ~ 30 s 后才能回复两点。具体延迟多久我也忘了。
ps2:旧版那个泊地修理插件有这个计算

general improvement regarding this plugin

I'd like to propose few improvement of this plugin:

  • adding a "Repairable ships" tab

    by "Repairable" I mean all ships that don't have full HP, including those taiha/chuuha'd ships, this gives user a quick overview for helping them to have a better plan of docking & anchorage repair. for this tab, related columns are very similar to that of other tabs: kamusu (name / lvl), HP, required docking time, required time for recovering 1 HP or whatever you feel convenient to call it.

    In addition to having those columns, we can also add an extra column or use color as indications to inform user about ship statuses. this status would include:

    this ship

    • can be repaired by anchorage repair
    • is on expedition
    • is in taiha/chuuka state
    • is docking
    • is being repaired through anchorage repair
    • is repairable but haven't been put to use any repair method

    all states could be mutually exclusive so a color can be given if one considers the color indicator approach.

  • Flexible tab width

    The idea is to suggest user which tab he/she might be interested in by varying tab header width:

    • a fleet tab is only interesting if Akashi is the current flagship and the fleet is not on expedition - otherwise anchorage repairing isn't possible.

    • a "Repairable ships" tab is interesting only when there are repairable ships - otherwise it's just an empty list.

    we can define 2 types of tab width: "wide" and "narrow" and give those interesting ones "wide" tab and others "narrow".

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.