RPGMakerID
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Komunitas RPG Maker Indonesia
 
IndeksIndeks  Latest imagesLatest images  PencarianPencarian  PendaftaranPendaftaran  Login  
Per 2016, RMID pindah ke RMID Discord (Invite link dihapus untuk mencegah spambot -Theo @ 2019). Posting sudah tidak bisa dilakukan lagi.
Mohon maaf atas ketidaknyamanannya dan mohon kerjasamanya.

 

 [VXA] YEA:LSP Add On Mana Shield

Go down 
PengirimMessage
AlfaOokami
Newbie
Newbie
AlfaOokami


Level 5
Posts : 7
Thanked : 1
Engine : Multi-Engine User
Skill : Intermediate
Type : Artist

[VXA] YEA:LSP Add On Mana Shield Empty
PostSubyek: [VXA] YEA:LSP Add On Mana Shield   [VXA] YEA:LSP Add On Mana Shield Empty2012-11-21, 21:34

Well, setelah sekian lama memperhatikan bagaimana teknisi dari Lunatic Packagenya Yanfly dan dengan skill scripting saya yang near zero, akhirnya saya buat ni add on
Why? Karena saya emang kesengsem sama state effect yang satu ini

Mana Shield
Saat aktif, damage yang diiterima akan dialihkan ke MP.

Code:
    #----------------------------------------------------------------------
    # Alfa Effect No.1: Mana Shield
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    # You alreasy know what it does right :D
    #
    # Recommended notetag:
    #  <react effect: mana shield x%>
    #
    # Where x is the amount of damage absorbed by MP, as a percentage.
    # 200% means each point of MP can absorb 2 points of damage
    #----------------------------------------------------------------------
    when /MANA SHIELD[ ](\d+)([%%])/i
      return unless @result.hp_damage > 0
      mp_dmg = @result.hp_damage * $1.to_i * 0.01
      hp_dmg = @result.hp_damage * (100 - $1.to_i) * 0.01
      if mp_dmg >= self.mp
        @result.mp_damage = self.mp
        if self.mp == 0
          self.hp -= @result.hp_damage
        else
          @result.hp_damage = hp_dmg + (mp_dmg - @result.mp_damage)
          self.hp -= @result.hp_damage
          self.mp -= @result.mp_damage
        end
      else
        @result.mp_damage = mp_dmg
        @result.hp_damage = hp_dmg
        self.hp -= hp_dmg
        self.mp -= mp_dmg
      end
      return unless $imported["YEA-BattleEngine"]
      make_damage_popups(user)

Required : YEA Lunatic States
Instruction : just put it inside the Package's Addon

or if you insist, put this below the YEA: Lunatic States

Code:
#==============================================================================
#
# ▼ Yanfly Engine Ace - Lunatic States Alfa Effect v1.00
# -- Last Updated: 2012.11.21
# -- Level: Lunatic
# -- Requires: YEA - Lunatic States v1.00+
#
#==============================================================================

$imported = {} if $imported.nil?
$imported["YEA-Alfa-Effect"] = true

# ▼ Instructions
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
#
# Install this script under YEA - Lunatic States.
#
#==============================================================================

if $imported["YEA-LunaticStates"]
class Game_BattlerBase
 
    #----------------------------------------------------------------------
    # Lunatic States: Alfa Effect No.1: Mana Shield
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    # You alreasy know what it does right :D
    #
    # Recommended notetag:
    #  <react effect: mana shield x%>
    #----------------------------------------------------------------------
    when /MANA SHIELD[ ](\d+)([%%])/i
      return unless @result.hp_damage > 0
      mp_dmg = @result.hp_damage * $1.to_i * 0.01
      hp_dmg = @result.hp_damage * (100 - $1.to_i) * 0.01
      if mp_dmg >= self.mp
        @result.mp_damage = self.mp
        if self.mp == 0
          self.hp -= @result.hp_damage
        else
          @result.hp_damage = hp_dmg + (mp_dmg - @result.mp_damage)
          self.hp -= @result.hp_damage
          self.mp -= @result.mp_damage
        end
      else
        @result.mp_damage = mp_dmg
        @result.hp_damage = hp_dmg
        self.hp -= hp_dmg
        self.mp -= mp_dmg
      end
      return unless $imported["YEA-BattleEngine"]
      make_damage_popups(user)

    #----------------------------------------------------------------------
    # Stop editting past this point.
    #----------------------------------------------------------------------
    else
      so = state_origin
      lw = log_window
      lunatic_state_extension_lsp2(effect, state, user, so, lw)
    end
  end
 
end # Game_BattlerBase
end # $imported["YEA-LunaticStates"]

#==============================================================================
#
# ▼ End of File
#
#==============================================================================

Credits : Of course you must credit Yanfly for this, not me


Terakhir diubah oleh AlfaOokami tanggal 2012-11-22, 04:56, total 3 kali diubah (Reason for editing : edit typo)
Kembali Ke Atas Go down
 
[VXA] YEA:LSP Add On Mana Shield
Kembali Ke Atas 
Halaman 1 dari 1
 Similar topics
-
» [XP] Mana Shield State
» [VX] Mana Shield State
» [ask] weapon, shield & armor's endurance
» [ASK] Mana Bagusan Ya
» Rumit Mana??

Permissions in this forum:Anda tidak dapat menjawab topik
RPGMakerID :: Scripts & Event Systems :: RMVX Ace Scripts :: RGSS3 Support-
Navigasi: