Skip to content

Instantly share code, notes, and snippets.

@triacontane
Created March 25, 2018 07:23
Show Gist options
  • Save triacontane/6b5990e60d22a48cf7c9e1db2a612373 to your computer and use it in GitHub Desktop.
Save triacontane/6b5990e60d22a48cf7c9e1db2a612373 to your computer and use it in GitHub Desktop.
パーティ全員のMPの合計値を取得します。
$gameParty.members().reduce(function(sum, actor) {return sum + actor.mp;}, 0);
@triacontane
Copy link
Author

パーティ全員のMPの合計値を取得します。
HPの場合はactor.hpに変更するなどすれば、様々なパラメータの合計値を取得できます。
(アロー関数使いたいから早くツクールMV 1.6.0出ないかな~~~~~~~)

@triacontane
Copy link
Author

戦闘参加メンバーの場合は「members()」を「battleMembers()」に変えます。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment