pazzdra 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 78dcbbe385855316542f47e90b7f5d6a3fef4210
4
- data.tar.gz: 9d77a1cc9bfdbe88176a6ba696a01909ac09e614
3
+ metadata.gz: 531645b9c5280006fd686524c268a2464a5ceeb0
4
+ data.tar.gz: cd1d8fc3307e5634328b672da048d2684727e17b
5
5
  SHA512:
6
- metadata.gz: d43622f0b752a2e15f48c47b383d63d948547a41019ce5db37b9dabc94b553f29ee1bc42a4d649cf17bc72ed8508b77a12ef232a3d88949b8b3b6c85d960bd42
7
- data.tar.gz: add24662f01d7a8182a2401ade876f189aa8d4071a2e401b65ad13f4e657a79335e176e64016886b8152c3ce66690142ee358661d2ec93bcb38474df73e66cab
6
+ metadata.gz: b4003ef4416e8f8fcf99e492eb301ac6c40e843b0bd1c8cc589492b59646b26df951146ce992a13cb12abd6ef5908b1054088dda47876e4a011aa9725232f735
7
+ data.tar.gz: 0c8ff255bc19c02d6cd602975220bfd402d61ada36c524e2025a7ced8c31577a37df91d993268100a1d027f96bbaefa9a371b0d0919bfc4735892c47600aaabe
data/bin/pad_calc CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # -*- coding: utf-8 -*-
2
3
  #
3
4
  # (c)2014 akagi takashi
4
5
  #
data/lib/pazzdra/calc.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # -*- coding: utf-8 -*-
1
2
 
2
3
  module Pazzdra
3
4
  class Calc
@@ -51,7 +52,9 @@ module Pazzdra
51
52
  @data[:leader], @data[:friend], @data[:skill], combo_up_pct
52
53
  next unless val[:sub]
53
54
  dragon[:sub] = {}
54
- dragon[:sub][val[:sub]] = Calc.cal attack_power_with_all_pct((val[key].to_f / 2).to_i, val[:sub]),
55
+ attc_pct = 0.3
56
+ attc_pct = 0.1 if key == val[:sub]
57
+ dragon[:sub][val[:sub]] = Calc.cal attack_power_with_all_pct((val[key].to_f * attc_pct).to_i, val[:sub]),
55
58
  @data[:leader], @data[:friend], @data[:skill], combo_up_pct
56
59
  end
57
60
  dragons.push(dragon)
@@ -1,3 +1,4 @@
1
+ # -*- coding: utf-8 -*-
1
2
 
2
3
  require 'time'
3
4
 
@@ -1,3 +1,3 @@
1
1
  module Pazzdra
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
data/pazzdra.gemspec CHANGED
@@ -1,4 +1,5 @@
1
- # coding: utf-8
1
+ # -*- coding: utf-8 -*-
2
+
2
3
  lib = File.expand_path('../lib', __FILE__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require 'pazzdra/version'
data/spec/calc_spec.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # -*- coding: utf-8 -*-
1
2
 
2
3
  require 'spec_helper'
3
4
  require 'pazzdra'
@@ -50,7 +51,7 @@ describe Pazzdra::Calc, "攻撃力計算機能" do
50
51
  end
51
52
  it "ベースの色指定、コンボ色指定 複数" do
52
53
  @calc.merge({ base: [{r: 1000, sub: :r},{b: 1200, sub: :r}], leader: 2.5, combo: {r: [3], g: [3,4,4], b: [3] } })
53
- should eq [{r: 5000, sub: {r: 2500}},{b: 6000, sub: {r: 3000}}]
54
+ should eq [{r: 5000, sub: {r: 500}},{b: 6000, sub: {r: 1800}}]
54
55
  end
55
56
  it "ベースの色指定、コンボ色指定 攻撃色が複数" do
56
57
  @calc.merge({ base: [{r: 1000}], leader: 2.5, combo: {r: [3, 3], g: [3,4], b: [3] } })
@@ -58,15 +59,15 @@ describe Pazzdra::Calc, "攻撃力計算機能" do
58
59
  end
59
60
  it "ベースの色指定、コンボ色指定 攻撃色が複数、長さ4越え" do
60
61
  @calc.merge({ base: [{g: 1200, sub: :g}], leader: 2.5, combo: {r: [3, 3], g: [3,4], b: [3] } })
61
- should eq [{g: 13500, sub: {g: 6750}}]
62
+ should eq [{g: 13500, sub: {g: 1350}}]
62
63
  end
63
64
  it "ベースの色指定、コンボ色指定 攻撃色が複数、長さ4越え 複数" do
64
65
  @calc.merge({ base: [{g: 1200, sub: :g},{y: 1234, sub: :r}], leader: 2.5, friend: 2, skill: 1.5, combo: {r: [3, 3], g: [3,4], b: [3], y: [4, 6] } })
65
- should eq [{g: 50625, sub: {g: 25313}},{y: 69413, sub: {r: 23138}}]
66
+ should eq [{g: 50625, sub: {g: 5063}},{y: 69413, sub: {r: 13875}}]
66
67
  end
67
68
  it "ベースの色指定、コンボ色指定 攻撃色が複数、長さ4越え 複数、強化ドロップあり" do
68
69
  @calc.merge({ base: [{g: 1200, sub: :g},{y: 1234, sub: :r}], leader: 2.5, friend: 2, skill: 1.5, combo: {r: [3, 3], g: [3,4], b: [3], y: [4, 6] }, plus_drop: {g: 4} })
69
- should eq [{g: 62775, sub: {g: 31388}},{y: 69413, sub: {r: 23138}}]
70
+ should eq [{g: 62775, sub: {g: 6278}},{y: 69413, sub: {r: 13875}}]
70
71
  end
71
72
  end
72
73
  end
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # -*- coding: utf-8 -*-
2
+
1
3
  require 'rubygems'
2
4
 
3
5
  #RSpec::Matchers.define :my_matcher do |expected|
data/spec/stamina_spec.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # -*- coding: utf-8 -*-
1
2
 
2
3
  require 'spec_helper'
3
4
  require 'pazzdra'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pazzdra
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - takashi.akagi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-22 00:00:00.000000000 Z
11
+ date: 2014-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -116,4 +116,3 @@ test_files:
116
116
  - spec/calc_spec.rb
117
117
  - spec/spec_helper.rb
118
118
  - spec/stamina_spec.rb
119
- has_rdoc: