Game_Party ⇐ Game_Unit
Kind: global class
Extends: Game_Unit
- Game_Party ⇐
Game_Unit
- new Game_Party()
- instance
- .exists() ⇒
boolean
- .size() ⇒
number
- .isEmpty() ⇒
boolean
- .members() ⇒
Array
- .allMembers() ⇒
Array
- .battleMembers() ⇒
Array
- .maxBattleMembers() ⇒
number
- .leader() ⇒
Game_Actor
|undefined
- .reviveBattleMembers()
- .items() ⇒
Array
- .weapons() ⇒
Array
- .armors() ⇒
Array
- .equipItems() ⇒
Array
- .allItems() ⇒
Array
- .itemContainer(item) ⇒
object
|null
- .setupStartingMembers()
- .name() ⇒
string
- .setupBattleTest()
- .setupBattleTestMembers()
- .setupBattleTestItems()
- .highestLevel() ⇒
number
- .addActor(actorId)
- .removeActor(actorId)
- .gold() ⇒
number
- .gainGold(amount)
- .loseGold(amount)
- .maxGold() ⇒
number
- .steps() ⇒
number
- .increaseSteps()
- .numItems(item) ⇒
number
- .maxItems(item) ⇒
number
- .hasMaxItems(item) ⇒
boolean
- .hasItem(item, includeEquip) ⇒
boolean
- .isAnyMemberEquipped(item) ⇒
boolean
- .gainItem(item, amount, includeEquip)
- .discardMembersEquip(item, amount)
- .loseItem(item, amount, includeEquip)
- .consumeItem(item)
- .canUse(item) ⇒
boolean
- .canInput() ⇒
boolean
- .isAllDead() ⇒
boolean
- .onPlayerWalk()
- .menuActor() ⇒
Game_Actor
- .setMenuActor(actor)
- .makeMenuActorNext()
- .makeMenuActorPrevious()
- .targetActor() ⇒
Game_Actor
- .setTargetActor(actor)
- .lastItem() ⇒
object
- .setLastItem(item)
- .swapOrder(index1, index2)
- .charactersForSavefile() ⇒
Array
- .facesForSavefile() ⇒
Array
- .partyAbility(abilityId) ⇒
boolean
- .hasEncounterHalf() ⇒
boolean
- .hasEncounterNone() ⇒
boolean
- .hasCancelSurprise() ⇒
boolean
- .hasRaisePreemptive() ⇒
boolean
- .hasGoldDouble() ⇒
boolean
- .hasDropItemDouble() ⇒
boolean
- .ratePreemptive(troopAgi) ⇒
number
- .rateSurprise(troopAgi) ⇒
number
- .performVictory()
- .performEscape()
- .removeBattleStates()
- .requestMotionRefresh()
- .exists() ⇒
- static
- .ABILITY_ENCOUNTER_HALF :
number
- .ABILITY_ENCOUNTER_NONE :
number
- .ABILITY_CANCEL_SURPRISE :
number
- .ABILITY_RAISE_PREEMPTIVE :
number
- .ABILITY_GOLD_DOUBLE :
number
- .ABILITY_DROP_ITEM_DOUBLE :
number
- .initialize()
- .initAllItems()
- .ABILITY_ENCOUNTER_HALF :
new Game_Party()
游戏队伍类,管理角色队伍、物品仓库和金钱
Game party class that manages actor party, item storage and gold
game_Party.exists() ⇒ boolean
检查是否存在角色
Check if party exists (has actors)
Kind: instance method of Game_Party
Returns: boolean
- 是否存在角色 / Whether actors exist
game_Party.size() ⇒ number
获取队伍大小
Get party size
Kind: instance method of Game_Party
Returns: number
- 队伍大小 / Party size
game_Party.isEmpty() ⇒ boolean
检查队伍是否为空
Check if party is empty
Kind: instance method of Game_Party
Returns: boolean
- 队伍是否为空 / Whether party is empty
game_Party.members() ⇒ Array
获取成员(战斗中返回战斗成员,否则返回所有成员)
Get members (battle members in battle, all members otherwise)
Kind: instance method of Game_Party
Returns: Array
- 成员数组 / Members array
game_Party.allMembers() ⇒ Array
获取所有成员
Get all members
Kind: instance method of Game_Party
Returns: Array
- 所有成员数组 / All members array
game_Party.battleMembers() ⇒ Array
获取战斗成员
Get battle members
Kind: instance method of Game_Party
Returns: Array
- 战斗成员数组 / Battle members array
game_Party.maxBattleMembers() ⇒ number
获取最大战斗成员数
Get max battle members count
Kind: instance method of Game_Party
Returns: number
- 最大战斗成员数 / Max battle members count
game_Party.leader() ⇒ Game_Actor
| undefined
获取队长
Get party leader
Kind: instance method of Game_Party
Returns: Game_Actor
| undefined
- 队长角色 / Leader actor
game_Party.reviveBattleMembers()
复活战斗成员
Revive battle members
允许战斗失败的情况下,战斗失败后全员复活且 1 血。
When battle defeat is allowed, all members revive with 1 HP after defeat.
Kind: instance method of Game_Party
game_Party.items() ⇒ Array
获取物品列表
Get items list
Kind: instance method of Game_Party
Returns: Array
- 物品列表 / Items list
game_Party.weapons() ⇒ Array
获取武器列表
Get weapons list
Kind: instance method of Game_Party
Returns: Array
- 武器列表 / Weapons list
game_Party.armors() ⇒ Array
获取护甲列表
Get armors list
Kind: instance method of Game_Party
Returns: Array
- 护甲列表 / Armors list
game_Party.equipItems() ⇒ Array
获取装备物品(武器和护甲)
Get equipment items (weapons and armors)
Kind: instance method of Game_Party
Returns: Array
- 装备物品列表 / Equipment items list
game_Party.allItems() ⇒ Array
获取所有物品(物品、武器和护甲)
Get all items (items, weapons and armors)
Kind: instance method of Game_Party
Returns: Array
- 所有物品列表 / All items list
game_Party.itemContainer(item) ⇒ object
| null
获取物品容器
Get item container
Kind: instance method of Game_Party
Returns: object
| null
- 物品容器 / Item container
Param | Type | Description |
---|---|---|
item | object | 物品对象 / Item object |
game_Party.setupStartingMembers()
设置初始成员
Setup starting members
Kind: instance method of Game_Party
game_Party.name() ⇒ string
获取队伍名称
Get party name
Kind: instance method of Game_Party
Returns: string
- 队伍名称 / Party name
game_Party.setupBattleTest()
设置战斗测试
Setup battle test
Kind: instance method of Game_Party
game_Party.setupBattleTestMembers()
设置战斗测试成员
Setup battle test members
Kind: instance method of Game_Party
game_Party.setupBattleTestItems()
设置战斗测试物品
Setup battle test items
Kind: instance method of Game_Party
game_Party.highestLevel() ⇒ number
获取最高等级
Get highest level
返回队伍中等级最高的成员的等级。
Returns the level of the highest-level member in the party.
Kind: instance method of Game_Party
Returns: number
- 最高等级 / Highest level
game_Party.addActor(actorId)
添加角色
Add actor
Kind: instance method of Game_Party
Param | Type | Description |
---|---|---|
actorId | number | 角色 ID / Actor ID |
game_Party.removeActor(actorId)
移除角色
Remove actor
Kind: instance method of Game_Party
Param | Type | Description |
---|---|---|
actorId | number | 角色 ID / Actor ID |
game_Party.gold() ⇒ number
获取金钱数量
Get gold amount
Kind: instance method of Game_Party
Returns: number
- 金钱数量 / Gold amount
game_Party.gainGold(amount)
获得金钱
Gain gold
Kind: instance method of Game_Party
Param | Type | Description |
---|---|---|
amount | number | 金钱数量 / Gold amount |
game_Party.loseGold(amount)
失去金钱
Lose gold
Kind: instance method of Game_Party
Param | Type | Description |
---|---|---|
amount | number | 金钱数量 / Gold amount |
game_Party.maxGold() ⇒ number
获取金钱上限
Get max gold
Kind: instance method of Game_Party
Returns: number
- 金钱上限 / Max gold
game_Party.steps() ⇒ number
获取步数
Get steps count
Kind: instance method of Game_Party
Returns: number
- 步数 / Steps count
game_Party.increaseSteps()
增加步数
Increase steps
Kind: instance method of Game_Party
game_Party.numItems(item) ⇒ number
获取物品数量
Get item amount
Kind: instance method of Game_Party
Returns: number
- 物品数量 / Item amount
Param | Type | Description |
---|---|---|
item | object | 物品对象 / Item object |
game_Party.maxItems(item) ⇒ number
获取物品上限
Get max items
Kind: instance method of Game_Party
Returns: number
- 物品上限 / Max items
Param | Type | Description |
---|---|---|
item | object | 物品对象 / Item object |
game_Party.hasMaxItems(item) ⇒ boolean
检查是否该物品数量超过上限
Check if item amount has reached max
Kind: instance method of Game_Party
Returns: boolean
- 是否已达上限 / Whether max is reached
Param | Type | Description |
---|---|---|
item | object | 物品对象 / Item object |
game_Party.hasItem(item, includeEquip) ⇒ boolean
检查是否拥有该物品
Check if party has item
Kind: instance method of Game_Party
Returns: boolean
- 是否拥有物品 / Whether has item
Param | Type | Description |
---|---|---|
item | object | 物品对象 / Item object |
includeEquip | boolean | 是否包含装备 / Whether to include equipment |
game_Party.isAnyMemberEquipped(item) ⇒ boolean
检查是否有成员装备该物品
Check if any member has item equipped
Kind: instance method of Game_Party
Returns: boolean
- 是否有成员装备 / Whether any member equipped
Param | Type | Description |
---|---|---|
item | object | 物品对象 / Item object |
game_Party.gainItem(item, amount, includeEquip)
获得物品
Gain item
Kind: instance method of Game_Party
Param | Type | Description |
---|---|---|
item | object | 物品对象 / Item object |
amount | number | 数量 / Amount |
includeEquip | boolean | 是否包含装备 / Whether to include equipment |
game_Party.discardMembersEquip(item, amount)
丢弃成员装备
Discard members' equipment
Kind: instance method of Game_Party
Param | Type | Description |
---|---|---|
item | object | 物品对象 / Item object |
amount | number | 数量 / Amount |
game_Party.loseItem(item, amount, includeEquip)
失去物品
Lose item
Kind: instance method of Game_Party
Param | Type | Description |
---|---|---|
item | object | 物品对象 / Item object |
amount | number | 数量 / Amount |
includeEquip | boolean | 是否包含装备 / Whether to include equipment |
game_Party.consumeItem(item)
消耗物品
Consume item
Kind: instance method of Game_Party
Param | Type | Description |
---|---|---|
item | object | 物品对象 / Item object |
game_Party.canUse(item) ⇒ boolean
检查是否可使用物品
Check if item can be used
Kind: instance method of Game_Party
Returns: boolean
- 是否可使用 / Whether can use
Param | Type | Description |
---|---|---|
item | object | 物品对象 / Item object |
game_Party.canInput() ⇒ boolean
检查是否可输入
Check if can input
Kind: instance method of Game_Party
Returns: boolean
- 是否可输入 / Whether can input
game_Party.isAllDead() ⇒ boolean
检查是否全部死亡
Check if all members are dead
Kind: instance method of Game_Party
Returns: boolean
- 是否全部死亡 / Whether all are dead
game_Party.onPlayerWalk()
当玩家行走时的处理
Processing when player walks
Kind: instance method of Game_Party
game_Party.menuActor() ⇒ Game_Actor
获取菜单角色
Get menu actor
菜单界面中选中的角色。
The actor selected in menu scene.
Kind: instance method of Game_Party
Returns: Game_Actor
- 菜单角色 / Menu actor
game_Party.setMenuActor(actor)
设置菜单角色
Set menu actor
设置菜单界面中选中的角色。
Set the actor selected in menu scene.
Kind: instance method of Game_Party
Param | Type | Description |
---|---|---|
actor | Game_Actor | 角色对象 / Actor object |
game_Party.makeMenuActorNext()
制作下一个菜单角色
Make next menu actor
技能、装备和状态界面按 PageDown 后切换下一个角色。
Switch to next actor when PageDown is pressed in skill, equip and status scenes.
Kind: instance method of Game_Party
game_Party.makeMenuActorPrevious()
制作上一个菜单角色
Make previous menu actor
技能、装备和状态界面按 PageUp 后切换上一个角色。
Switch to previous actor when PageUp is pressed in skill, equip and status scenes.
Kind: instance method of Game_Party
game_Party.targetActor() ⇒ Game_Actor
获取目标角色
Get target actor
Kind: instance method of Game_Party
Returns: Game_Actor
- 目标角色 / Target actor
game_Party.setTargetActor(actor)
设置目标角色
Set target actor
Kind: instance method of Game_Party
Param | Type | Description |
---|---|---|
actor | Game_Actor | 角色对象 / Actor object |
game_Party.lastItem() ⇒ object
获取上次使用的物品
Get last item used
Kind: instance method of Game_Party
Returns: object
- 上次使用的物品 / Last item used
game_Party.setLastItem(item)
设置上次使用的物品
Set last item used
Kind: instance method of Game_Party
Param | Type | Description |
---|---|---|
item | object | 物品对象 / Item object |
game_Party.swapOrder(index1, index2)
交换角色顺序
Swap actor order
Kind: instance method of Game_Party
Param | Type | Description |
---|---|---|
index1 | number | 索引 1 / Index 1 |
index2 | number | 索引 2 / Index 2 |
game_Party.charactersForSavefile() ⇒ Array
获取存档用的角色行走图
Get characters for save file
Kind: instance method of Game_Party
Returns: Array
- 角色行走图数组 / Characters array for save file
game_Party.facesForSavefile() ⇒ Array
获取存档用的脸图
Get faces for save file
Kind: instance method of Game_Party
Returns: Array
- 脸图数组 / Faces array for save file
game_Party.partyAbility(abilityId) ⇒ boolean
检查队伍能力
Check party ability
Kind: instance method of Game_Party
Returns: boolean
- 是否拥有该能力 / Whether has the ability
Param | Type | Description |
---|---|---|
abilityId | number | 能力 ID / Ability ID |
game_Party.hasEncounterHalf() ⇒ boolean
检查是否遇敌减半
Check if has encounter rate half
Kind: instance method of Game_Party
Returns: boolean
- 是否遇敌减半 / Whether has encounter rate half
game_Party.hasEncounterNone() ⇒ boolean
检查是否无遇敌
Check if has no encounter
Kind: instance method of Game_Party
Returns: boolean
- 是否无遇敌 / Whether has no encounter
game_Party.hasCancelSurprise() ⇒ boolean
检查是否取消偷袭
Check if can cancel surprise
Kind: instance method of Game_Party
Returns: boolean
- 是否取消偷袭 / Whether can cancel surprise
game_Party.hasRaisePreemptive() ⇒ boolean
检查是否增加先发制人率
Check if can raise preemptive rate
Kind: instance method of Game_Party
Returns: boolean
- 是否增加先发制人率 / Whether can raise preemptive rate
game_Party.hasGoldDouble() ⇒ boolean
检查是否双倍金钱
Check if has double gold
Kind: instance method of Game_Party
Returns: boolean
- 是否双倍金钱 / Whether has double gold
game_Party.hasDropItemDouble() ⇒ boolean
检查是否双倍掉落物品
Check if has double drop items
Kind: instance method of Game_Party
Returns: boolean
- 是否双倍掉落物品 / Whether has double drop items
game_Party.ratePreemptive(troopAgi) ⇒ number
计算先发制人概率
Calculate preemptive rate
Kind: instance method of Game_Party
Returns: number
- 先发制人概率 / Preemptive rate
Param | Type | Description |
---|---|---|
troopAgi | number | 敌群敏捷度 / Troop agility |
game_Party.rateSurprise(troopAgi) ⇒ number
计算偷袭概率
Calculate surprise rate
Kind: instance method of Game_Party
Returns: number
- 偷袭概率 / Surprise rate
Param | Type | Description |
---|---|---|
troopAgi | number | 敌群敏捷度 / Troop agility |
game_Party.performVictory()
表现胜利
Perform victory
Kind: instance method of Game_Party
game_Party.performEscape()
表现逃跑
Perform escape
Kind: instance method of Game_Party
game_Party.removeBattleStates()
移除战斗状态
Remove battle states
Kind: instance method of Game_Party
game_Party.requestMotionRefresh()
请求动作刷新
Request motion refresh
Kind: instance method of Game_Party
Game_Party.ABILITY_ENCOUNTER_HALF : number
队伍能力常量 - 遇敌减半
Party ability constant - Encounter rate half
Kind: static property of Game_Party
Game_Party.ABILITY_ENCOUNTER_NONE : number
队伍能力常量 - 无遇敌
Party ability constant - No encounter
Kind: static property of Game_Party
Game_Party.ABILITY_CANCEL_SURPRISE : number
队伍能力常量 - 取消偷袭
Party ability constant - Cancel surprise
Kind: static property of Game_Party
Game_Party.ABILITY_RAISE_PREEMPTIVE : number
队伍能力常量 - 增加先发制人率
Party ability constant - Raise preemptive rate
Kind: static property of Game_Party
Game_Party.ABILITY_GOLD_DOUBLE : number
队伍能力常量 - 双倍金钱
Party ability constant - Double gold
Kind: static property of Game_Party
Game_Party.ABILITY_DROP_ITEM_DOUBLE : number
队伍能力常量 - 双倍掉落物品
Party ability constant - Double drop items
Kind: static property of Game_Party
Game_Party.initialize()
初始化队伍
Initialize party
Kind: static method of Game_Party
Game_Party.initAllItems()
初始化所有物品
Initialize all items
Kind: static method of Game_Party