Created
March 25, 2018 07:23
-
-
Save triacontane/6b5990e60d22a48cf7c9e1db2a612373 to your computer and use it in GitHub Desktop.
パーティ全員のMPの合計値を取得します。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$gameParty.members().reduce(function(sum, actor) {return sum + actor.mp;}, 0); |
戦闘参加メンバーの場合は「members()」を「battleMembers()」に変えます。
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
パーティ全員のMPの合計値を取得します。
HPの場合はactor.hpに変更するなどすれば、様々なパラメータの合計値を取得できます。
(アロー関数使いたいから早くツクールMV 1.6.0出ないかな~~~~~~~)