Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
mycard
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaoye
mycard
Commits
d5296ddb
Commit
d5296ddb
authored
Nov 22, 2011
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
表示形式
parent
a79aa886
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
25 deletions
+50
-25
lib/action.rb
lib/action.rb
+25
-7
lib/iduel_action.rb
lib/iduel_action.rb
+15
-8
lib/window_field.rb
lib/window_field.rb
+10
-10
No files found.
lib/action.rb
View file @
d5296ddb
...
@@ -175,22 +175,22 @@ class Action
...
@@ -175,22 +175,22 @@ class Action
end
end
class
Remove
<
Move
class
Remove
<
Move
def
initialize
(
from_player
,
from_pos
,
card
)
def
initialize
(
from_player
,
from_pos
,
card
)
super
(
from_player
,
from_pos
,
:removed
,
card
,
:attack
)
super
(
from_player
,
from_pos
,
:removed
,
card
,
nil
,
:attack
)
end
end
end
end
class
ReturnToHand
<
Move
class
ReturnToHand
<
Move
def
initialize
(
from_player
,
from_pos
,
card
)
def
initialize
(
from_player
,
from_pos
,
card
)
super
(
from_player
,
from_pos
,
:hand
,
card
,
:attack
)
super
(
from_player
,
from_pos
,
:hand
,
card
,
nil
,
:attack
)
end
end
end
end
class
ReturnToDeck
<
Move
class
ReturnToDeck
<
Move
def
initialize
(
from_player
,
from_pos
,
card
)
def
initialize
(
from_player
,
from_pos
,
card
)
super
(
from_player
,
from_pos
,
:deck
,
card
,
:set
)
super
(
from_player
,
from_pos
,
:deck
,
card
,
nil
,
:set
)
end
end
end
end
class
ReturnToExtra
<
Move
class
ReturnToExtra
<
Move
def
initialize
(
from_player
,
from_pos
,
card
)
def
initialize
(
from_player
,
from_pos
,
card
)
super
(
from_player
,
from_pos
,
:extra
,
card
,
:set
)
super
(
from_player
,
from_pos
,
:extra
,
card
,
nil
,
:set
)
end
end
end
end
class
Control
<
Move
class
Control
<
Move
...
@@ -199,12 +199,20 @@ class Action
...
@@ -199,12 +199,20 @@ class Action
end
end
end
end
class
Tribute
<
SendToGraveyard
;
end
class
Tribute
<
SendToGraveyard
;
end
class
Flip
<
Move
class
ChangePosition
<
Move
def
initialize
(
from_player
,
from_pos
,
card
)
def
initialize
(
from_player
,
from_pos
,
card
,
position
)
super
(
from_player
,
from_pos
,
from_pos
,
card
)
super
(
from_player
,
from_pos
,
from_pos
,
card
,
nil
,
position
)
end
end
class
Flip
<
ChangePosition
def
initialize
(
from_player
,
from_pos
,
card
,
position
=
:defense
)
super
(
from_player
,
from_pos
,
card
,
position
)
end
end
end
end
class
FlipSummon
<
Flip
class
FlipSummon
<
Flip
def
initialize
(
from_player
,
from_pos
,
card
)
super
(
from_player
,
from_pos
,
card
,
:attack
)
end
end
end
class
Draw
<
Move
class
Draw
<
Move
def
initialize
(
from_player
=
true
,
msg
=
nil
)
def
initialize
(
from_player
=
true
,
msg
=
nil
)
...
@@ -239,5 +247,15 @@ class Action
...
@@ -239,5 +247,15 @@ class Action
@from_pos
=
from_pos
@from_pos
=
from_pos
@card
=
card
@card
=
card
end
end
def
run
if
@card
.
position
==
:set
if
@card
.
monster?
@card
.
position
=
:defense
else
@card
.
position
=
:attack
end
end
super
end
end
end
end
end
\ No newline at end of file
lib/iduel_action.rb
View file @
d5296ddb
...
@@ -251,12 +251,6 @@ class Action
...
@@ -251,12 +251,6 @@ class Action
class
Set
class
Set
def
escape
def
escape
case
@from_pos
case
@from_pos
when
@to_pos
if
(
0
..
5
).
include?
@to_pos
#魔陷
"[
#{
@id
}
] ◎→(
#{
@from_pos
}
)
#{
@card
.
escape
}
变为里侧表示"
elsif
(
6
..
10
).
include?
@to_pos
#怪兽
"[
#{
@id
}
] ◎→从怪兽区(
#{
@from_pos
}
)~取一张怪兽卡盖到场上(
#{
@to_pos
}
)"
end
when
:hand
when
:hand
"[
#{
@id
}
] ◎→从手卡~取一张
#{
@card
.
monster?
?
"怪兽卡"
:
"魔/陷卡"
}
盖到场上(
#{
@to_pos
}
)"
"[
#{
@id
}
] ◎→从手卡~取一张
#{
@card
.
monster?
?
"怪兽卡"
:
"魔/陷卡"
}
盖到场上(
#{
@to_pos
}
)"
end
end
...
@@ -335,16 +329,29 @@ class Action
...
@@ -335,16 +329,29 @@ class Action
"[
#{
@id
}
] ◎→
#{
@card
.
escape
}
从
#{
pos
}
返回额外牌堆"
"[
#{
@id
}
] ◎→
#{
@card
.
escape
}
从
#{
pos
}
返回额外牌堆"
end
end
end
end
class
Flip
<
Move
class
Flip
def
escape
def
escape
"[
#{
@id
}
] ◎→(
#{
@from_pos
}
)
#{
@card
.
escape
}
打开"
"[
#{
@id
}
] ◎→(
#{
@from_pos
}
)
#{
@card
.
escape
}
打开"
end
end
end
end
class
FlipSummon
<
Flip
class
FlipSummon
def
escape
def
escape
"[
#{
@id
}
] ◎→(
#{
@from_pos
}
)
#{
@card
.
escape
}
反转"
"[
#{
@id
}
] ◎→(
#{
@from_pos
}
)
#{
@card
.
escape
}
反转"
end
end
end
end
class
ChangePosition
def
escape
if
@position
==
:set
if
(
6
..
10
).
include?
@from_pos
#攻击表示的怪兽,由于iduel没有变成里侧守备指令,所以采用重新放置的方式
"[
#{
@id
}
] ◎→从怪兽区(
#{
@from_pos
}
)~取一张怪兽卡盖到场上(
#{
@to_pos
}
)"
else
"[
#{
@id
}
] ◎→(
#{
@from_pos
}
)
#{
@card
.
escape
}
变为里侧表示"
end
else
"[
#{
@id
}
] ◎→(
#{
@from_pos
}
)
#{
@card
.
escape
}
改为
#{
position
==
:attack
?
'攻击'
:
'防守'
}
表示"
end
end
end
class
Effect_Activate
class
Effect_Activate
def
escape
def
escape
pos
=
case
@from_pos
pos
=
case
@from_pos
...
...
lib/window_field.rb
View file @
d5296ddb
...
@@ -145,13 +145,13 @@ class Window_Field < Window
...
@@ -145,13 +145,13 @@ class Window_Field < Window
}
}
when
6
..
10
when
6
..
10
@card
=
@field
.
field
[
@index
]
@card
=
@field
.
field
[
@index
]
@action_names
=
{
"攻击表示"
=>
fal
se
,
@action_names
=
{
"攻击表示"
=>
@card
.
position
==
:defen
se
,
"守备表示"
=>
false
,
"守备表示"
=>
@card
.
position
==
:attack
,
"里侧表示"
=>
true
,
"里侧表示"
=>
@card
.
position!
=
:set
,
"反转召唤"
=>
true
,
"反转召唤"
=>
@card
.
position
==
:set
,
"打开"
=>
true
,
"打开"
=>
@card
.
position
==
:set
,
"效果发动"
=>
true
,
"效果发动"
=>
true
,
"攻击宣言"
=>
false
,
"攻击宣言"
=>
@card
.
position
==
:attack
,
"转移控制权"
=>
false
,
"转移控制权"
=>
false
,
"放回卡组顶端"
=>
true
,
"放回卡组顶端"
=>
true
,
"送入墓地"
=>
true
,
"送入墓地"
=>
true
,
...
@@ -288,16 +288,16 @@ class Window_Field < Window
...
@@ -288,16 +288,16 @@ class Window_Field < Window
when
4
#加入手卡
when
4
#加入手卡
Action
::
ReturnToHand
.
new
(
true
,
@index
,
@card
).
run
Action
::
ReturnToHand
.
new
(
true
,
@index
,
@card
).
run
when
5
#盖伏
when
5
#盖伏
Action
::
Set
.
new
(
true
,
@index
,
@index
,
@card
).
run
Action
::
ChangePosition
.
new
(
true
,
@index
,
@card
,
:set
).
run
end
end
when
6
..
10
#前场
when
6
..
10
#前场
case
$scene
.
action_window
.
index
case
$scene
.
action_window
.
index
when
0
when
0
p
"未实现"
Action
::
ChangePosition
.
new
(
true
,
@index
,
@card
,
:attack
).
run
when
1
when
1
p
"未实现"
Action
::
ChangePosition
.
new
(
true
,
@index
,
@card
,
:defense
).
run
when
2
when
2
Action
::
Set
.
new
(
true
,
@index
,
@index
,
@card
).
run
Action
::
ChangePosition
.
new
(
true
,
@index
,
@card
,
:set
).
run
when
3
when
3
Action
::
FlipSummon
.
new
(
true
,
@index
,
@card
).
run
Action
::
FlipSummon
.
new
(
true
,
@index
,
@card
).
run
when
4
when
4
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment