Project1
标题:
装备等级和双倍
[打印本页]
作者:
lkgyp56
时间:
2009-1-11 03:06
提示:
作者被禁止或删除 内容自动屏蔽
作者:
风花雪月
时间:
2009-1-11 03:18
好吧,正好把最近写的脚本给你(双倍经验)
class Game_Actor < Game_Battler
attr_accessor :add_exp #############
def initialize(actor_id)
super()
setup(actor_id)
@add_exp = false #############
end
end
class Scene_Battle
def start_phase5
@phase = 5
$game_system.me_play($game_system.battle_end_me)
$game_system.bgm_play($game_temp.map_bgm)
exp = 0
gold = 0
treasures = []
for enemy in $game_troop.enemies
unless enemy.hidden
exp += enemy.exp
gold += enemy.gold
if rand(100) < enemy.treasure_prob
if enemy.item_id > 0
treasures.push($data_items[enemy.item_id])
end
if enemy.weapon_id > 0
treasures.push($data_weapons[enemy.weapon_id])
end
if enemy.armor_id > 0
treasures.push($data_armors[enemy.armor_id])
end
end
end
end
treasures = treasures[0..5]
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
if actor.cant_get_exp? == false
last_level = actor.level
if actor.add_exp == true
exp = exp*2
actor.exp += exp
else
actor.exp += exp
end
if actor.level > last_level
@status_window.level_up(i)
end
end
end
$game_party.gain_gold(gold)
for item in treasures
case item
when RPG::Item
$game_party.gain_item(item.id, 1)
when RPG::Weapon
$game_party.gain_weapon(item.id, 1)
when RPG::Armor
$game_party.gain_armor(item.id, 1)
end
end
@result_window = Window_BattleResult.new(exp, gold, treasures)
@phase5_wait_count = 100
end
end
复制代码
开启双倍经验的方法是:$game_actors[x].add_exp = true/false,x是角色的编号
----------------------------------------
装备的等级限制是:
http://rpg.blue/web/htm/news429.htm
[LINE]1,#dddddd[/LINE]
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
作者:
lkgyp56
时间:
2009-1-11 17:18
提示:
作者被禁止或删除 内容自动屏蔽
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1