tatamo / freecivcalc2 Goto Github PK
View Code? Open in Web Editor NEWFreeciv battle calculator
Home Page: http://tatamo.81.la/freecivcalc2/
License: BSD 3-Clause "New" or "Revised" License
Freeciv battle calculator
Home Page: http://tatamo.81.la/freecivcalc2/
License: BSD 3-Clause "New" or "Revised" License
tired_attackを有効化したルールセットではユニットの攻撃力が残りの移動力に応じて変化し、たとえばユニットの移動力が2/3なら攻撃力も2/3に、1/3なら攻撃力が1/3になります。
FreecivCalc2のデータセットでこれを実現する場合、自由に保持させることのできる情報はチェックボックスとして表せるフラグのみなので、exフラグ内に1/3の場合、2/3の場合とすべてのパターンを列挙しなければなりません。
たとえばciv2civ3ルールセットでは鉄道の移動力消費が1/6になっているため、このルールセットにtired_attackを適用した場合はユニットの残り移動力に応じて5通りものフラグを定義する必要が生じ、非常に煩雑になってしまいます。
このルールに対応するため、例えば数値選択ボックスなども定義できるようにデータセットの記述方法を変更する必要があると思われます。
おそらく後方互換性を破壊する修正になりますが、現時点ではクラシック以外のデータセットを新しく作ろうという動きは無いと思われるので、そこまで大きな問題とはならないでしょう。
またatacker|defender-strength-multiply補正は実数の範囲ならサポートしているので小数点以下3,4桁ほど書けば誤差などの問題は生じないとは思うのですが、1/3などの値を表現するために掛け算のみではなく割り算もサポートしたほうがいいかもしれません。
基本的にソースコードはsrcディレクトリにまとめている(freecivcalc.jsはあくまでコンパイル後の成果物)けれど、widgets.jsだけルートに配置されていてよくない。
TypeScriptで書きなおして、freecivcalc.jsにまとめて突っ込んでしまったほうがいい
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.